aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/debugger/debuggerplugin.cpp
diff options
context:
space:
mode:
authorhjk <[email protected]>2014-09-12 01:08:28 +0200
committerhjk <[email protected]>2014-09-26 08:50:00 +0200
commit1ba91e3040e9bebb2fc9f41bb786d365e28a6bee (patch)
treef84f740e6f14c408a9c17ee888fb36082d8ebff5 /src/plugins/debugger/debuggerplugin.cpp
parentd066e3ca143128d51e12edbcf04b74633326d914 (diff)
ProjectExplorer: Apply static pattern to ProjectExplorerPlugin
Adjust caller sites and surroundings. Change-Id: I6c3c80e42f35eabedc1f89c8c42cca1025aca12f Reviewed-by: Daniel Teske <[email protected]>
Diffstat (limited to 'src/plugins/debugger/debuggerplugin.cpp')
-rw-r--r--src/plugins/debugger/debuggerplugin.cpp18
1 files changed, 7 insertions, 11 deletions
diff --git a/src/plugins/debugger/debuggerplugin.cpp b/src/plugins/debugger/debuggerplugin.cpp
index d1a1adc0836..848073f68e7 100644
--- a/src/plugins/debugger/debuggerplugin.cpp
+++ b/src/plugins/debugger/debuggerplugin.cpp
@@ -1540,20 +1540,17 @@ void DebuggerPluginPrivate::languagesChanged()
void DebuggerPluginPrivate::debugProject()
{
- if (Project *pro = SessionManager::startupProject())
- ProjectExplorerPlugin::instance()->runProject(pro, DebugRunMode);
+ ProjectExplorerPlugin::runProject(SessionManager::startupProject(), DebugRunMode);
}
void DebuggerPluginPrivate::debugProjectWithoutDeploy()
{
- if (Project *pro = SessionManager::startupProject())
- ProjectExplorerPlugin::instance()->runProject(pro, DebugRunMode, true);
+ ProjectExplorerPlugin::runProject(SessionManager::startupProject(), DebugRunMode, true);
}
void DebuggerPluginPrivate::debugProjectBreakMain()
{
- if (Project *pro = SessionManager::startupProject())
- ProjectExplorerPlugin::instance()->runProject(pro, DebugRunModeWithBreakOnMain);
+ ProjectExplorerPlugin::runProject(SessionManager::startupProject(), DebugRunModeWithBreakOnMain);
}
void DebuggerPluginPrivate::startAndDebugApplication()
@@ -3527,13 +3524,12 @@ void DebuggerPlugin::extensionsInitialized()
void DebuggerPluginPrivate::testLoadProject(const QString &proFile, const TestCallBack &cb)
{
- ProjectExplorerPlugin *pe = ProjectExplorerPlugin::instance();
- connect(pe, SIGNAL(currentProjectChanged(ProjectExplorer::Project*)),
- this, SLOT(testProjectLoaded(ProjectExplorer::Project*)));
+ connect(ProjectExplorerPlugin::instance(), &ProjectExplorerPlugin::currentProjectChanged,
+ this, &DebuggerPluginPrivate::testProjectLoaded);
m_testCallbacks.append(cb);
QString error;
- if (pe->openProject(proFile, &error)) {
+ if (ProjectExplorerPlugin::openProject(proFile, &error)) {
// Will end up in callback below due to the connections to
// signal currentProjectChanged().
return;
@@ -3563,7 +3559,7 @@ void DebuggerPluginPrivate::testProjectEvaluated()
qWarning("Project %s loaded", qPrintable(fileName));
connect(BuildManager::instance(), SIGNAL(buildQueueFinished(bool)),
SLOT(testProjectBuilt(bool)));
- ProjectExplorerPlugin::instance()->buildProject(m_testProject);
+ ProjectExplorerPlugin::buildProject(m_testProject);
}
void DebuggerPluginPrivate::testProjectBuilt(bool success)