kdevplatform/shell: work-around for Qt 5.9/macOS bug showing modified indicator

parent 5a286ea5
......@@ -463,9 +463,16 @@ void MainWindow::updateCaption()
isDocumentModified = iDoc && (iDoc->state() != IDocument::Clean);
}
// Workaround for a bug observed on macOS with Qt 5.9.8 (TODO: test with newer Qt, report bug):
// Ensure to call setCaption() (thus implicitly setWindowTitle()) before
// setWindowModified() & setWindowFilePath().
// Otherwise, if the state will change "modifed" from true to false as well change the title string,
// calling setWindowTitle() last results in the "modified" indicator==asterisk becoming part of the
// displayed window title somehow.
// Other platforms so far not known to be affected, any order of calls seems fine.
setCaption(title);
setWindowModified(isDocumentModified);
setWindowFilePath(localFilePath);
setCaption(title);
}
void MainWindow::updateAllTabColors()
......
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