Debugger: Reduce one call to runnable()

Change-Id: I8e0ce18fa65a3281fcadf9b5a8ffb4008a0cf294
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
Orgad Shaneh
2017-07-14 00:16:55 +03:00
committed by Orgad Shaneh
parent 7327bb3537
commit b710f79bef

View File

@@ -281,11 +281,12 @@ static bool fixupParameters(DebuggerRunParameters &rp, RunControl *runControl, Q
QTC_ASSERT(kit, return false);
// Extract as much as possible from available RunConfiguration.
if (runConfig->runnable().is<StandardRunnable>()) {
const Runnable runnable = runConfig->runnable();
if (runnable.is<StandardRunnable>()) {
// FIXME: Needed for core dump which stores the executable in inferior, but not in runConfig
// executable.
const QString prevExecutable = rp.inferior.executable;
rp.inferior = runConfig->runnable().as<StandardRunnable>();
rp.inferior = runnable.as<StandardRunnable>();
if (rp.inferior.executable.isEmpty())
rp.inferior.executable = prevExecutable;
rp.useTerminal = rp.inferior.runMode == ApplicationLauncher::Console;