Commit eba91574 authored by hjk's avatar hjk

debugger: pass RunConfiguration to ProjectExplorer::RunControl constructor if known.

parent 9a3acd48
......@@ -168,12 +168,13 @@ RunControl *DebuggerRunControlFactory::create
{
QTC_ASSERT(mode == ProjectExplorer::Constants::DEBUGMODE, return 0);
DebuggerStartParameters sp = localStartParameters(runConfiguration);
return create(sp);
return create(sp, runConfiguration);
}
RunControl *DebuggerRunControlFactory::create(const DebuggerStartParameters &sp)
RunControl *DebuggerRunControlFactory::create(const DebuggerStartParameters &sp,
RunConfiguration *runConfiguration)
{
DebuggerRunControl *runControl = new DebuggerRunControl;
DebuggerRunControl *runControl = new DebuggerRunControl(runConfiguration);
runControl->setEnabledEngines(m_enabledEngines);
runControl->createEngine(sp);
if (!runControl->engine()) {
......@@ -200,10 +201,9 @@ QWidget *DebuggerRunControlFactory::createConfigurationWidget(RunConfiguration *
//
////////////////////////////////////////////////////////////////////////
DebuggerRunControl::DebuggerRunControl(QObject *parent)
: RunControl(0, ProjectExplorer::Constants::DEBUGMODE)
DebuggerRunControl::DebuggerRunControl(RunConfiguration *runConfiguration)
: RunControl(runConfiguration, ProjectExplorer::Constants::DEBUGMODE)
{
Q_UNUSED(parent);
m_running = false;
m_engine = 0;
m_enabledEngines = AllEngineTypes;
......
......@@ -68,7 +68,9 @@ public:
*runConfiguration);
// This is used by the "Non-Standard" scenarios, e.g. Attach to Core.
ProjectExplorer::RunControl *create(const DebuggerStartParameters &sp);
// FIXME: What to do in case of a 0 runConfiguration?
ProjectExplorer::RunControl *create(const DebuggerStartParameters &sp,
ProjectExplorer::RunConfiguration *runConfiguration = 0);
private:
DebuggerEngineType m_enabledEngines;
......@@ -83,7 +85,7 @@ class DEBUGGER_EXPORT DebuggerRunControl
Q_OBJECT
public:
DebuggerRunControl(QObject *parent = 0);
DebuggerRunControl(ProjectExplorer::RunConfiguration *runConfiguration);
~DebuggerRunControl();
// ProjectExplorer::RunControl
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment