aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/debugger
diff options
context:
space:
mode:
authorhjk <[email protected]>2023-02-14 15:47:22 +0100
committerhjk <[email protected]>2023-03-01 09:26:50 +0000
commit3e7d93c788773c7f8194a5465ee0f46961432d76 (patch)
tree115ed460e95c7c4043e71b37372f1e62b89834c5 /src/plugins/debugger
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 <[email protected]> Reviewed-by: <[email protected]>
Diffstat (limited to 'src/plugins/debugger')
-rw-r--r--src/plugins/debugger/debuggerplugin.cpp17
-rw-r--r--src/plugins/debugger/debuggerruncontrol.cpp7
2 files changed, 13 insertions, 11 deletions
diff --git a/src/plugins/debugger/debuggerplugin.cpp b/src/plugins/debugger/debuggerplugin.cpp
index 8ab67c0bc54..e8c14d4dccf 100644
--- a/src/plugins/debugger/debuggerplugin.cpp
+++ b/src/plugins/debugger/debuggerplugin.cpp
@@ -67,9 +67,10 @@
#include <projectexplorer/projectexplorericons.h>
#include <projectexplorer/projectexplorerconstants.h>
#include <projectexplorer/projectexplorersettings.h>
+#include <projectexplorer/projectmanager.h>
#include <projectexplorer/projecttree.h>
#include <projectexplorer/runconfiguration.h>
-#include <projectexplorer/session.h>
+#include <projectexplorer/projectmanager.h>
#include <projectexplorer/target.h>
#include <projectexplorer/taskhub.h>
#include <projectexplorer/toolchain.h>
@@ -1187,7 +1188,7 @@ DebuggerPluginPrivate::DebuggerPluginPrivate(const QStringList &arguments)
setInitialState();
- connect(SessionManager::instance(), &SessionManager::startupProjectChanged,
+ connect(ProjectManager::instance(), &ProjectManager::startupProjectChanged,
this, &DebuggerPluginPrivate::onStartupProjectChanged);
connect(EngineManager::instance(), &EngineManager::engineStateChanged,
this, &DebuggerPluginPrivate::updatePresetState);
@@ -1394,8 +1395,8 @@ void DebuggerPluginPrivate::updatePresetState()
if (m_shuttingDown)
return;
- Project *startupProject = SessionManager::startupProject();
- RunConfiguration *startupRunConfig = SessionManager::startupRunConfiguration();
+ Project *startupProject = ProjectManager::startupProject();
+ RunConfiguration *startupRunConfig = ProjectManager::startupRunConfiguration();
DebuggerEngine *currentEngine = EngineManager::currentEngine();
QString whyNot;
@@ -1997,7 +1998,7 @@ void DebuggerPluginPrivate::aboutToShutdown()
{
m_shuttingDown = true;
- disconnect(SessionManager::instance(), &SessionManager::startupProjectChanged, this, nullptr);
+ disconnect(ProjectManager::instance(), &ProjectManager::startupProjectChanged, this, nullptr);
m_shutdownTimer.setInterval(0);
m_shutdownTimer.setSingleShot(true);
@@ -2165,7 +2166,7 @@ static bool buildTypeAccepted(QFlags<ToolMode> toolMode, BuildConfiguration::Bui
static BuildConfiguration::BuildType startupBuildType()
{
BuildConfiguration::BuildType buildType = BuildConfiguration::Unknown;
- if (RunConfiguration *runConfig = SessionManager::startupRunConfiguration()) {
+ if (RunConfiguration *runConfig = ProjectManager::startupRunConfiguration()) {
if (const BuildConfiguration *buildConfig = runConfig->target()->activeBuildConfiguration())
buildType = buildConfig->buildType();
}
@@ -2335,12 +2336,12 @@ void DebuggerUnitTests::testStateMachine()
QEventLoop loop;
connect(BuildManager::instance(), &BuildManager::buildQueueFinished,
&loop, &QEventLoop::quit);
- BuildManager::buildProjectWithDependencies(SessionManager::startupProject());
+ BuildManager::buildProjectWithDependencies(ProjectManager::startupProject());
loop.exec();
ExecuteOnDestruction guard([] { EditorManager::closeAllEditors(false); });
- RunConfiguration *rc = SessionManager::startupRunConfiguration();
+ RunConfiguration *rc = ProjectManager::startupRunConfiguration();
QVERIFY(rc);
auto runControl = new RunControl(ProjectExplorer::Constants::DEBUG_RUN_MODE);
diff --git a/src/plugins/debugger/debuggerruncontrol.cpp b/src/plugins/debugger/debuggerruncontrol.cpp
index 8b6ac29c995..3a5d84d3b6b 100644
--- a/src/plugins/debugger/debuggerruncontrol.cpp
+++ b/src/plugins/debugger/debuggerruncontrol.cpp
@@ -23,8 +23,9 @@
#include <projectexplorer/project.h>
#include <projectexplorer/projectexplorer.h>
#include <projectexplorer/projectexplorericons.h>
+#include <projectexplorer/projectmanager.h>
#include <projectexplorer/runconfigurationaspects.h>
-#include <projectexplorer/session.h>
+#include <projectexplorer/projectmanager.h>
#include <projectexplorer/target.h>
#include <projectexplorer/taskhub.h>
#include <projectexplorer/toolchain.h>
@@ -182,8 +183,8 @@ void DebuggerRunTool::setStartMode(DebuggerStartMode startMode)
// FIXME: This is horribly wrong.
// get files from all the projects in the session
- QList<Project *> projects = SessionManager::projects();
- if (Project *startupProject = SessionManager::startupProject()) {
+ QList<Project *> projects = ProjectManager::projects();
+ if (Project *startupProject = ProjectManager::startupProject()) {
// startup project first
projects.removeOne(startupProject);
projects.insert(0, startupProject);