summaryrefslogtreecommitdiff
path: root/src/plugins/debugger
diff options
context:
space:
mode:
authorOrgad Shaneh <orgad.shaneh@audiocodes.com>2017-07-14 00:16:55 +0300
committerOrgad Shaneh <orgads@gmail.com>2017-07-14 06:19:09 +0000
commitb710f79bef03cdc7b21604fa08fb393f0be55fd2 (patch)
treeca3c813dee9cd9b3a20a9f7c781a416b4cebdc76 /src/plugins/debugger
parent7327bb353720a825bffd046a78b4cfd48c16e531 (diff)
downloadqt-creator-b710f79bef03cdc7b21604fa08fb393f0be55fd2.tar.gz
Debugger: Reduce one call to runnable()
Change-Id: I8e0ce18fa65a3281fcadf9b5a8ffb4008a0cf294 Reviewed-by: hjk <hjk@qt.io>
Diffstat (limited to 'src/plugins/debugger')
-rw-r--r--src/plugins/debugger/debuggerruncontrol.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/plugins/debugger/debuggerruncontrol.cpp b/src/plugins/debugger/debuggerruncontrol.cpp
index dca0a53e38..fd1a894573 100644
--- a/src/plugins/debugger/debuggerruncontrol.cpp
+++ b/src/plugins/debugger/debuggerruncontrol.cpp
@@ -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;