MCPcopy Create free account
hub / github.com/KDE/kdevelop / updateTabColor

Method updateTabColor

kdevplatform/shell/mainwindow.cpp:536–552  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

534}
535
536void 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
554void MainWindow::registerStatus(QObject* status)
555{

Callers

nothing calls this directly

Calls 8

containersMethod · 0.95
colorForDocumentFunction · 0.85
defaultColorFunction · 0.85
colorizeByProjectMethod · 0.80
setTabColorMethod · 0.80
urlMethod · 0.45
viewsMethod · 0.45
documentMethod · 0.45

Tested by

no test coverage detected