Commit 11574611 authored by dt's avatar dt
Browse files

Session Manager: Easier code flow

parent 4c108128
......@@ -894,14 +894,14 @@ void SessionManager::handleCurrentEditorChange(Core::IEditor *editor)
void SessionManager::updateWindowTitle()
{
QString windowTitle = tr("Qt Creator");
if (!isDefaultSession(m_sessionName)) {
if (isDefaultSession(m_sessionName)) {
if (Project *currentProject = ProjectExplorerPlugin::instance()->currentProject())
windowTitle.prepend(currentProject->displayName() + " - ");
} else {
QString sessionName = m_sessionName;
if (sessionName.isEmpty())
sessionName = tr("Untitled");
windowTitle.prepend(sessionName + " - ");
} else {
if (Project *currentProject = ProjectExplorerPlugin::instance()->currentProject())
windowTitle.prepend(currentProject->displayName() + " - ");
}
if (m_core->editorManager()->currentEditor()) {
QFileInfo fi(m_core->editorManager()->currentEditor()->file()->fileName());
......
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