Members of the KDE Community are recommended to subscribe to the kde-community mailing list at 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()
title += doc->title();
auto activeDocument = Core::self()->documentController()->activeDocument();
if (activeDocument && activeDocument->textDocument() && !activeDocument->textDocument()->isReadWrite())
auto iDoc = qobject_cast<IDocument*>(doc);
if (iDoc && iDoc->textDocument() && !iDoc->textDocument()->isReadWrite()) {
title += i18n(" (read only)");
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