aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/cppcheck
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/cppcheck
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/cppcheck')
-rw-r--r--src/plugins/cppcheck/cppcheckplugin.cpp11
-rw-r--r--src/plugins/cppcheck/cppchecktrigger.cpp4
2 files changed, 8 insertions, 7 deletions
diff --git a/src/plugins/cppcheck/cppcheckplugin.cpp b/src/plugins/cppcheck/cppcheckplugin.cpp
index 5dd09a1820b..8d44f0dda56 100644
--- a/src/plugins/cppcheck/cppcheckplugin.cpp
+++ b/src/plugins/cppcheck/cppcheckplugin.cpp
@@ -16,7 +16,7 @@
#include <projectexplorer/project.h>
#include <projectexplorer/projectexplorer.h>
#include <projectexplorer/projectexplorerconstants.h>
-#include <projectexplorer/session.h>
+#include <projectexplorer/projectmanager.h>
#include <projectexplorer/target.h>
#include <coreplugin/actionmanager/actioncontainer.h>
@@ -97,8 +97,9 @@ CppcheckPluginPrivate::CppcheckPluginPrivate()
}
}
-void CppcheckPluginPrivate::startManualRun() {
- auto project = ProjectExplorer::SessionManager::startupProject();
+void CppcheckPluginPrivate::startManualRun()
+{
+ auto project = ProjectExplorer::ProjectManager::startupProject();
if (!project)
return;
@@ -121,8 +122,8 @@ void CppcheckPluginPrivate::startManualRun() {
void CppcheckPluginPrivate::updateManualRunAction()
{
using namespace ProjectExplorer;
- const Project *project = SessionManager::startupProject();
- const Target *target = SessionManager::startupTarget();
+ const Project *project = ProjectManager::startupProject();
+ const Target *target = ProjectManager::startupTarget();
const Utils::Id cxx = ProjectExplorer::Constants::CXX_LANGUAGE_ID;
const bool canRun = target && project->projectLanguages().contains(cxx)
&& ToolChainKitAspect::cxxToolChain(target->kit());
diff --git a/src/plugins/cppcheck/cppchecktrigger.cpp b/src/plugins/cppcheck/cppchecktrigger.cpp
index 55b1cf7ac01..8be098df558 100644
--- a/src/plugins/cppcheck/cppchecktrigger.cpp
+++ b/src/plugins/cppcheck/cppchecktrigger.cpp
@@ -13,7 +13,7 @@
#include <coreplugin/editormanager/ieditor.h>
#include <projectexplorer/project.h>
-#include <projectexplorer/session.h>
+#include <projectexplorer/projectmanager.h>
using namespace Core;
using namespace ProjectExplorer;
@@ -34,7 +34,7 @@ CppcheckTrigger::CppcheckTrigger(CppcheckTextMarkManager &marks, CppcheckTool &t
connect(EditorManager::instance(), &EditorManager::aboutToSave,
this, &CppcheckTrigger::checkChangedDocument);
- connect(SessionManager::instance(), &SessionManager::startupProjectChanged,
+ connect(ProjectManager::instance(), &ProjectManager::startupProjectChanged,
this, &CppcheckTrigger::changeCurrentProject);
connect(CppModelManager::instance(), &CppModelManager::projectPartsUpdated,