| 534 | } |
| 535 | |
| 536 | void MainWindow::updateTabColor(IDocument* doc) |
| 537 | { |
| 538 | if (!UiConfig::self()->colorizeByProject()) |
| 539 | return; |
| 540 | |
| 541 | const auto color = colorForDocument(doc->url(), palette(), defaultColor(palette())); |
| 542 | const auto containers = this->containers(); |
| 543 | for (auto* container : containers) { |
| 544 | const auto views = container->views(); |
| 545 | for (auto* view : views) { |
| 546 | const auto urlDoc = qobject_cast<Sublime::UrlDocument*>(view->document()); |
| 547 | if (urlDoc && urlDoc->url() == doc->url()) { |
| 548 | container->setTabColor(view, color); |
| 549 | } |
| 550 | } |
| 551 | } |
| 552 | } |
| 553 | |
| 554 | void MainWindow::registerStatus(QObject* status) |
| 555 | { |
nothing calls this directly
no test coverage detected