aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/projectexplorer/projectmanager.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/projectexplorer/projectmanager.cpp')
-rw-r--r--src/plugins/projectexplorer/projectmanager.cpp13
1 files changed, 5 insertions, 8 deletions
diff --git a/src/plugins/projectexplorer/projectmanager.cpp b/src/plugins/projectexplorer/projectmanager.cpp
index ff5b214b10..6d0730786b 100644
--- a/src/plugins/projectexplorer/projectmanager.cpp
+++ b/src/plugins/projectexplorer/projectmanager.cpp
@@ -3,7 +3,6 @@
#include "projectmanager.h"
-#include "session_p.h"
#include "session.h"
#include "buildconfiguration.h"
@@ -280,7 +279,7 @@ void ProjectManager::addProject(Project *pro)
QTC_CHECK(!pro->displayName().isEmpty());
QTC_CHECK(pro->id().isValid());
- sb_d->m_virginSession = false;
+ SessionManager::markSessionFileDirty();
QTC_ASSERT(!d->m_projects.contains(pro), return);
d->m_projects.append(pro);
@@ -314,7 +313,7 @@ void ProjectManager::addProject(Project *pro)
void ProjectManager::removeProject(Project *project)
{
- sb_d->m_virginSession = false;
+ SessionManager::markSessionFileDirty();
QTC_ASSERT(project, return);
removeProjects({project});
}
@@ -396,7 +395,8 @@ void ProjectManagerPrivate::dependencies(const FilePath &proName, FilePaths &res
QString ProjectManagerPrivate::sessionTitle(const FilePath &filePath)
{
- if (SessionManager::isDefaultSession(sb_d->m_sessionName)) {
+ const QString sessionName = SessionManager::activeSession();
+ if (SessionManager::isDefaultSession(sessionName)) {
if (filePath.isEmpty()) {
// use single project's name if there is only one loaded.
const QList<Project *> projects = ProjectManager::projects();
@@ -404,10 +404,7 @@ QString ProjectManagerPrivate::sessionTitle(const FilePath &filePath)
return projects.first()->displayName();
}
} else {
- QString sessionName = sb_d->m_sessionName;
- if (sessionName.isEmpty())
- sessionName = Tr::tr("Untitled");
- return sessionName;
+ return sessionName.isEmpty() ? Tr::tr("Untitled") : sessionName;
}
return QString();
}