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

parent 12bf83b0
......@@ -451,9 +451,10 @@ void MainWindow::updateCaption()
else
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