Commit 7907e447 authored by Thorbjørn Lindeijer's avatar Thorbjørn Lindeijer

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

parent 73487792
...@@ -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());
......
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