Commit 62e57edf authored by con's avatar con
Browse files

Remove the window modified indicator feature from non-Mac again.

It creates too much headache with widgets calling setWindowTitle
themselves and Qt spilling out warnings about missing "[*]".

Reviewed-by: Thorbjørn Lindeijer
parent ec688e5c
...@@ -1529,7 +1529,9 @@ void EditorManager::updateActions() ...@@ -1529,7 +1529,9 @@ void EditorManager::updateActions()
fName = curEditor->displayName(); fName = curEditor->displayName();
} }
#ifdef Q_WS_MAC
window()->setWindowModified(curEditor->file()->isModified()); window()->setWindowModified(curEditor->file()->isModified());
#endif
if (curEditor->file()->isModified() && curEditor->file()->isReadOnly()) { if (curEditor->file()->isModified() && curEditor->file()->isReadOnly()) {
// we are about to change a read-only file, warn user // we are about to change a read-only file, warn user
showEditorInfoBar(QLatin1String("Core.EditorManager.MakeWritable"), showEditorInfoBar(QLatin1String("Core.EditorManager.MakeWritable"),
...@@ -1538,8 +1540,10 @@ void EditorManager::updateActions() ...@@ -1538,8 +1540,10 @@ void EditorManager::updateActions()
} else { } else {
hideEditorInfoBar(QLatin1String("Core.EditorManager.MakeWritable")); hideEditorInfoBar(QLatin1String("Core.EditorManager.MakeWritable"));
} }
#ifdef Q_WS_MAC
} else { // curEditor } else { // curEditor
window()->setWindowModified(false); window()->setWindowModified(false);
#endif
} }
m_d->m_saveAction->setEnabled(curEditor != 0 && curEditor->file()->isModified()); m_d->m_saveAction->setEnabled(curEditor != 0 && curEditor->file()->isModified());
......
...@@ -926,14 +926,10 @@ void SessionManager::updateWindowTitle() ...@@ -926,14 +926,10 @@ void SessionManager::updateWindowTitle()
if (m_core->editorManager()->currentEditor()) { if (m_core->editorManager()->currentEditor()) {
QFileInfo fi(m_core->editorManager()->currentEditor()->file()->fileName()); QFileInfo fi(m_core->editorManager()->currentEditor()->file()->fileName());
QString fileName = fi.fileName(); QString fileName = fi.fileName();
// [*] is placeholder for a windowModified marker, set in editor manager
if (!fileName.isEmpty()) if (!fileName.isEmpty())
windowTitle.prepend(fileName + "[*] - "); windowTitle.prepend(fileName + " - ");
else
windowTitle.append("[*]"); // placeholder will be removed by Qt)
m_core->mainWindow()->setWindowFilePath(fi.absoluteFilePath()); m_core->mainWindow()->setWindowFilePath(fi.absoluteFilePath());
} else { } else {
windowTitle.append("[*]"); // placeholder for windowModified property (is removed by Qt)
m_core->mainWindow()->setWindowFilePath(QString()); m_core->mainWindow()->setWindowFilePath(QString());
} }
m_core->mainWindow()->setWindowTitle(windowTitle); m_core->mainWindow()->setWindowTitle(windowTitle);
......
Supports Markdown
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