aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/debugger/debuggerplugin.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/debugger/debuggerplugin.cpp')
-rw-r--r--src/plugins/debugger/debuggerplugin.cpp34
1 files changed, 17 insertions, 17 deletions
diff --git a/src/plugins/debugger/debuggerplugin.cpp b/src/plugins/debugger/debuggerplugin.cpp
index 8ab67c0bc54..7ccc808b08f 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>
@@ -685,7 +686,6 @@ public:
EngineManager m_engineManager;
QTimer m_shutdownTimer;
- bool m_shuttingDown = false;
Console m_console; // ensure Debugger Console is created before settings are taken into account
DebuggerSettings m_debuggerSettings;
@@ -1187,7 +1187,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);
@@ -1391,11 +1391,11 @@ static QVariant configValue(const QString &name)
void DebuggerPluginPrivate::updatePresetState()
{
- if (m_shuttingDown)
+ if (PluginManager::isShuttingDown())
return;
- Project *startupProject = SessionManager::startupProject();
- RunConfiguration *startupRunConfig = SessionManager::startupRunConfiguration();
+ Project *startupProject = ProjectManager::startupProject();
+ RunConfiguration *startupRunConfig = ProjectManager::startupRunConfiguration();
DebuggerEngine *currentEngine = EngineManager::currentEngine();
QString whyNot;
@@ -1995,9 +1995,7 @@ void DebuggerPluginPrivate::dumpLog()
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);
@@ -2080,7 +2078,7 @@ QWidget *addSearch(BaseTreeView *treeView)
void openTextEditor(const QString &titlePattern0, const QString &contents)
{
- if (dd->m_shuttingDown)
+ if (PluginManager::isShuttingDown())
return;
QString titlePattern = titlePattern0;
IEditor *editor = EditorManager::openEditorWithContents(
@@ -2165,7 +2163,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();
}
@@ -2239,10 +2237,12 @@ bool wantRunTool(ToolMode toolMode, const QString &toolName)
"or otherwise insufficient output.</p><p>"
"Do you want to continue and run the tool in %2 mode?</p></body></html>")
.arg(toolName).arg(currentMode).arg(toolModeString);
- if (Utils::CheckableMessageBox::doNotAskAgainQuestion(ICore::dialogParent(),
- title, message, ICore::settings(), "AnalyzerCorrectModeWarning")
- != QDialogButtonBox::Yes)
- return false;
+ if (Utils::CheckableMessageBox::question(ICore::dialogParent(),
+ title,
+ message,
+ QString("AnalyzerCorrectModeWarning"))
+ != QMessageBox::Yes)
+ return false;
}
return true;
@@ -2335,12 +2335,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);