forked from qt-creator/qt-creator
Don't try to show an empty filename in the window title
This commit is contained in:
@@ -890,7 +890,9 @@ void SessionManager::updateWindowTitle()
|
||||
}
|
||||
if (m_core->editorManager()->currentEditor()) {
|
||||
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());
|
||||
} else {
|
||||
m_core->mainWindow()->setWindowFilePath(QString());
|
||||
|
||||
Reference in New Issue
Block a user