aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/debugger/debuggerrunner.cpp
diff options
context:
space:
mode:
authorFriedemann Kleint <[email protected]>2010-08-24 16:22:21 +0200
committerFriedemann Kleint <[email protected]>2010-08-24 16:22:21 +0200
commitad9ff8ed74d149cbb86c226933b9492b8adc819e (patch)
treeb825182c3ca2b5449feed29c2ce911235b97050d /src/plugins/debugger/debuggerrunner.cpp
parent616a9b13f08e41a8ffe67e852ed4197b99377a5f (diff)
Debugger: Fix exit crash.
Make sure DebuggerRunner::finished() is always connected to handleFinished() (even for subclassed DebuggerRunners). Add some more debugging information.
Diffstat (limited to 'src/plugins/debugger/debuggerrunner.cpp')
-rw-r--r--src/plugins/debugger/debuggerrunner.cpp19
1 files changed, 8 insertions, 11 deletions
diff --git a/src/plugins/debugger/debuggerrunner.cpp b/src/plugins/debugger/debuggerrunner.cpp
index 7452fa91e21..7bd3107bfde 100644
--- a/src/plugins/debugger/debuggerrunner.cpp
+++ b/src/plugins/debugger/debuggerrunner.cpp
@@ -189,7 +189,6 @@ DebuggerRunControl *DebuggerRunControlFactory::create(
delete runControl;
return 0;
}
- connect(runControl, SIGNAL(finished()), runControl, SLOT(handleFinished()));
return runControl;
}
@@ -209,13 +208,14 @@ QWidget *DebuggerRunControlFactory::createConfigurationWidget
////////////////////////////////////////////////////////////////////////
DebuggerRunControl::DebuggerRunControl(RunConfiguration *runConfiguration,
- DebuggerEngineType enabledEngines, const DebuggerStartParameters &sp)
- : RunControl(runConfiguration, ProjectExplorer::Constants::DEBUGMODE),
- m_myRunConfiguration(runConfiguration)
+ DebuggerEngineType enabledEngines, const DebuggerStartParameters &sp) :
+ RunControl(runConfiguration, ProjectExplorer::Constants::DEBUGMODE),
+ m_engine(0),
+ m_myRunConfiguration(runConfiguration),
+ m_running(false),
+ m_enabledEngines(enabledEngines)
{
- m_running = false;
- m_enabledEngines = enabledEngines;
- m_engine = 0;
+ connect(this, SIGNAL(finished()), this, SLOT(handleFinished()));
createEngine(sp);
}
@@ -336,9 +336,6 @@ void DebuggerRunControl::createEngine(const DebuggerStartParameters &sp)
{
// Figure out engine according to toolchain, executable, attach or default.
DebuggerEngineType engineType = NoEngineType;
- QString errorMessage;
- QString settingsIdHint;
-
bool isQmlExecutable = sp.executable.endsWith(_("qmlviewer")) || sp.executable.endsWith(_("qmlobserver"));
#ifdef Q_OS_MAC
isQmlExecutable = sp.executable.endsWith(_("QMLViewer.app")) || sp.executable.endsWith(_("QMLObserver.app"));
@@ -476,9 +473,9 @@ void DebuggerRunControl::start()
plugin()->showMessage(message, StatusBar);
plugin()->showMessage(DebuggerSettings::instance()->dump(), LogDebug);
+ plugin()->runControlStarted(this);
engine()->startDebugger(this);
m_running = true;
- plugin()->runControlStarted(this);
emit started();
}