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

Method documentTitleChanged

kdevplatform/sublime/container.cpp:533–559  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

531}
532
533void Container::documentTitleChanged(Sublime::Document* doc)
534{
535 Q_D(Container);
536
537 QHashIterator<QWidget*, View*> it = d->viewForWidget;
538 while (it.hasNext()) {
539 Sublime::View* view = it.next().value();
540 if (view->document() == doc) {
541 if (currentView() == view) {
542 d->fileNameCorner->setText( doc->title(Document::Extended) );
543 // TODO KF6: remove this as soon as it is included upstream and we reqire
544 // that version
545 // NOTE: this has languished and is still not upstream as of 6.3.0
546 // see https://phabricator.kde.org/D7010
547 d->fileNameCorner->updateGeometry();
548 }
549 int tabIndex = d->stack->indexOf(it.key());
550 if (tabIndex != -1) {
551 d->tabBar->setTabText(tabIndex, doc->title());
552 }
553
554 // Update document list popup title (and icon in case the extension changes and affects the MIME type)
555 d->renameInDocumentListMenu(view);
556 break;
557 }
558 }
559}
560
561int Container::count() const
562{

Callers

nothing calls this directly

Calls 9

hasNextMethod · 0.45
valueMethod · 0.45
nextMethod · 0.45
documentMethod · 0.45
setTextMethod · 0.45
titleMethod · 0.45
indexOfMethod · 0.45
keyMethod · 0.45

Tested by

no test coverage detected