Skip to content
Snippets Groups Projects
Commit 7907e447 authored by Thorbjørn Lindeijer's avatar Thorbjørn Lindeijer
Browse files

Don't try to show an empty filename in the window title

parent 73487792
No related branches found
No related tags found
No related merge requests found
...@@ -890,7 +890,9 @@ void SessionManager::updateWindowTitle() ...@@ -890,7 +890,9 @@ 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());
windowTitle.prepend(fi.fileName() + " - "); QString fileName = fi.fileName();
if (!fileName.isEmpty())
windowTitle.prepend(fileName + " - ");
m_core->mainWindow()->setWindowFilePath(fi.absoluteFilePath()); m_core->mainWindow()->setWindowFilePath(fi.absoluteFilePath());
} else { } else {
m_core->mainWindow()->setWindowFilePath(QString()); m_core->mainWindow()->setWindowFilePath(QString());
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment