diff options
author | hjk <hjk@theqtcompany.com> | 2016-03-22 13:11:01 +0100 |
---|---|---|
committer | hjk <hjk@theqtcompany.com> | 2016-03-22 13:56:03 +0000 |
commit | 903e40a91d8a42a2cebe940648d7017c2d59a50b (patch) | |
tree | e1375aaf771ccd9c7ce8bbc01783d95a641d8c48 | |
parent | 3cf5f29719359bede0b910e037d4ed72c12f8cd5 (diff) | |
download | qt-creator-903e40a91d8a42a2cebe940648d7017c2d59a50b.tar.gz |
Debugger: Fix initialization of StartParameters::useTerminal
Change-Id: I8b03b02323c6c4d9d714a6cc0ebc7ee40c0abf92
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
-rw-r--r-- | src/plugins/debugger/debuggerruncontrol.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/plugins/debugger/debuggerruncontrol.cpp b/src/plugins/debugger/debuggerruncontrol.cpp index defcaa1c7f..029c60c680 100644 --- a/src/plugins/debugger/debuggerruncontrol.cpp +++ b/src/plugins/debugger/debuggerruncontrol.cpp @@ -340,14 +340,16 @@ void DebuggerRunControlCreator::enrich(const RunConfiguration *runConfig, const if (!m_kit && m_target) m_kit = m_target->kit(); + // Make sure we have something sensible to start with. + m_rp.inferior.runMode == ApplicationLauncher::Console; + m_rp.useTerminal = false; + // Extract as much as possible from available RunConfiguration. if (m_runConfig && m_runConfig->runnable().is<StandardRunnable>()) { - auto runnable = m_runConfig->runnable().as<StandardRunnable>(); - m_rp.inferior.executable = runnable.executable; - m_rp.inferior.commandLineArguments = runnable.commandLineArguments; - m_rp.useTerminal = runnable.runMode == ApplicationLauncher::Console; + m_rp.inferior = m_runConfig->runnable().as<StandardRunnable>(); + m_rp.useTerminal = m_rp.inferior.runMode == ApplicationLauncher::Console; // Normalize to work around QTBUG-17529 (QtDeclarative fails with 'File name case mismatch'...) - m_rp.inferior.workingDirectory = FileUtils::normalizePathName(runnable.workingDirectory); + m_rp.inferior.workingDirectory = FileUtils::normalizePathName(m_rp.inferior.workingDirectory); } // We might get an executable from a local PID. |