aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/classview/classviewmanager.cpp
diff options
context:
space:
mode:
authorhjk <hjk@qt.io>2023-02-14 15:47:22 +0100
committerhjk <hjk@qt.io>2023-03-01 09:26:50 +0000
commit3e7d93c788773c7f8194a5465ee0f46961432d76 (patch)
tree115ed460e95c7c4043e71b37372f1e62b89834c5 /src/plugins/classview/classviewmanager.cpp
parent03e1c18f78c1103e149d7daee76ec070c8b001cf (diff)
ProjectExplorer: Move some not-fully-session related bits
... out of SessionManager. The idea is to later move SessionManager into the Core plugin, which both is sensible conceptually and also prerequisite to merge the Bookmark plugin into TextEditor plugin. Currently, only the interface is split, as the load/save implemetations are non-mechanical to disentangle. Change-Id: I31631db3094ea192825a2ccaa6add6188662940b Reviewed-by: Eike Ziller <eike.ziller@qt.io> Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Diffstat (limited to 'src/plugins/classview/classviewmanager.cpp')
-rw-r--r--src/plugins/classview/classviewmanager.cpp13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/plugins/classview/classviewmanager.cpp b/src/plugins/classview/classviewmanager.cpp
index a98cec7044..7f4eeb955c 100644
--- a/src/plugins/classview/classviewmanager.cpp
+++ b/src/plugins/classview/classviewmanager.cpp
@@ -8,8 +8,11 @@
#include <cppeditor/cppeditorconstants.h>
#include <cppeditor/cppmodelmanager.h>
+
#include <coreplugin/progressmanager/progressmanager.h>
-#include <projectexplorer/session.h>
+
+#include <projectexplorer/projectmanager.h>
+
#include <texteditor/texteditor.h>
#include <QThread>
@@ -90,7 +93,7 @@ void ManagerPrivate::resetParser()
cancelScheduledUpdate();
QHash<FilePath, QPair<QString, FilePaths>> projectData;
- for (const Project *project : SessionManager::projects()) {
+ for (const Project *project : ProjectManager::projects()) {
projectData.insert(project->projectFilePath(),
{project->displayName(), project->files(Project::SourceFiles)});
}
@@ -201,8 +204,8 @@ void Manager::initialize()
d->m_timer.setSingleShot(true);
// connections to enable/disable navi widget factory
- SessionManager *sessionManager = SessionManager::instance();
- connect(sessionManager, &SessionManager::projectAdded,
+ ProjectManager *sessionManager = ProjectManager::instance();
+ connect(sessionManager, &ProjectManager::projectAdded,
this, [this](Project *project) {
const FilePath projectPath = project->projectFilePath();
const QString projectName = project->displayName();
@@ -211,7 +214,7 @@ void Manager::initialize()
d->m_parser->addProject(projectPath, projectName, projectFiles);
}, Qt::QueuedConnection);
});
- connect(sessionManager, &SessionManager::projectRemoved,
+ connect(sessionManager, &ProjectManager::projectRemoved,
this, [this](Project *project) {
const FilePath projectPath = project->projectFilePath();
QMetaObject::invokeMethod(d->m_parser, [this, projectPath]() {