Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

kdevplatform/shell: do not repeat query & differently for current document

parent 12bf83b0
...@@ -451,9 +451,10 @@ void MainWindow::updateCaption() ...@@ -451,9 +451,10 @@ void MainWindow::updateCaption()
else else
title += doc->title(); title += doc->title();
auto activeDocument = Core::self()->documentController()->activeDocument(); auto iDoc = qobject_cast<IDocument*>(doc);
if (activeDocument && activeDocument->textDocument() && !activeDocument->textDocument()->isReadWrite()) if (iDoc && iDoc->textDocument() && !iDoc->textDocument()->isReadWrite()) {
title += i18n(" (read only)"); title += i18n(" (read only)");
}
title += QLatin1String(" ]"); title += QLatin1String(" ]");
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment