diff options
author | Daniel Teske <[email protected]> | 2012-09-05 12:42:41 +0200 |
---|---|---|
committer | Friedemann Kleint <[email protected]> | 2012-09-05 14:38:51 +0200 |
commit | 7657dd3a47bb86dd66e88d43ec58e6f32a5f6029 (patch) | |
tree | cbe07090b9fbe531b743045680ae7321ad05b6b8 /src/plugins/debugger/debuggerrunner.cpp | |
parent | c5097ed18389e357c1333ca7713f701d9751dce3 (diff) |
Add error string to IRunControlFactory::createRunControl
And add a few helpful error messages
Task-number: QTCREATORBUG-7826
Change-Id: Ia9f9fa476cecf2cff198bc460408bc062e119338
Reviewed-by: Friedemann Kleint <[email protected]>
Diffstat (limited to 'src/plugins/debugger/debuggerrunner.cpp')
-rw-r--r-- | src/plugins/debugger/debuggerrunner.cpp | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/src/plugins/debugger/debuggerrunner.cpp b/src/plugins/debugger/debuggerrunner.cpp index 85d96b9f50a..476d23e3acc 100644 --- a/src/plugins/debugger/debuggerrunner.cpp +++ b/src/plugins/debugger/debuggerrunner.cpp @@ -543,8 +543,9 @@ static DebuggerStartParameters localStartParameters(RunConfiguration *runConfigu } RunControl *DebuggerRunControlFactory::create - (RunConfiguration *runConfiguration, RunMode mode) + (RunConfiguration *runConfiguration, RunMode mode, QString *errorMessage) { + Q_UNUSED(errorMessage) QTC_ASSERT(mode == DebugRunMode || mode == DebugRunModeWithBreakOnMain, return 0); DebuggerStartParameters sp = localStartParameters(runConfiguration); if (sp.startMode == NoStartMode) @@ -552,7 +553,7 @@ RunControl *DebuggerRunControlFactory::create if (mode == DebugRunModeWithBreakOnMain) sp.breakOnMain = true; - return doCreate(sp, runConfiguration); + return doCreate(sp, runConfiguration, errorMessage); } static DebuggerEngineType guessUnixCppEngineType(const DebuggerStartParameters &sp) @@ -644,8 +645,9 @@ static void fixupEngineTypes(DebuggerStartParameters &sp, RunConfiguration *rc) } DebuggerRunControl *DebuggerRunControlFactory::doCreate - (const DebuggerStartParameters &sp0, RunConfiguration *rc) + (const DebuggerStartParameters &sp0, RunConfiguration *rc, QString *errorMessage) { + Q_UNUSED(errorMessage); DebuggerStartParameters sp = sp0; if (!debuggerCore()->boolSetting(AutoEnrichParameters)) { const QString sysroot = sp.sysRoot; @@ -663,8 +665,9 @@ DebuggerRunControl *DebuggerRunControlFactory::doCreate } fixupEngineTypes(sp, rc); - if (!sp.masterEngineType) + if (!sp.masterEngineType) { return 0; + } return new DebuggerRunControl(rc, sp); } @@ -672,9 +675,12 @@ DebuggerRunControl *DebuggerRunControlFactory::doCreate DebuggerRunControl *DebuggerRunControlFactory::createAndScheduleRun (const DebuggerStartParameters &sp, RunConfiguration *runConfiguration) { - DebuggerRunControl *rc = doCreate(sp, runConfiguration); - if (!rc) + QString errorMessage; + DebuggerRunControl *rc = doCreate(sp, runConfiguration, &errorMessage); + if (!rc) { + ProjectExplorer::ProjectExplorerPlugin::showRunErrorMessage(errorMessage); return 0; + } debuggerCore()->showMessage(sp.startMessage, 0); ProjectExplorerPlugin::instance()->startRunControl(rc, DebugRunMode); return rc; |