Commit b67bf73d authored by Orgad Shaneh's avatar Orgad Shaneh Committed by Orgad Shaneh

Debugger: Fix run in terminal

setUseTerminal was called before the engine was set. Reordered it.

Task-number: QTCREATORBUG-19056
Change-Id: I43f2aebaf72a904ea3a3bcf03cd41186b191b209
Reviewed-by: Christian Stenger's avatarChristian Stenger <christian.stenger@qt.io>
Reviewed-by: default avatarhjk <hjk@qt.io>
parent 81c59069
......@@ -797,15 +797,6 @@ DebuggerRunTool::DebuggerRunTool(RunControl *runControl, Kit *kit)
m_runParameters.macroExpander = kit->macroExpander();
m_runParameters.debugger = DebuggerKitInformation::runnable(kit);
Runnable r = runnable();
if (r.is<StandardRunnable>()) {
m_runParameters.inferior = r.as<StandardRunnable>();
// Normalize to work around QTBUG-17529 (QtDeclarative fails with 'File name case mismatch'...)
m_runParameters.inferior.workingDirectory =
FileUtils::normalizePathName(m_runParameters.inferior.workingDirectory);
setUseTerminal(m_runParameters.inferior.runMode == ApplicationLauncher::Console);
}
if (auto aspect = runConfig ? runConfig->extraAspect<DebuggerRunConfigurationAspect>() : nullptr) {
m_runParameters.isCppDebugging = aspect->useCppDebugger();
m_runParameters.isQmlDebugging = aspect->useQmlDebugger();
......@@ -815,6 +806,15 @@ DebuggerRunTool::DebuggerRunTool(RunControl *runControl, Kit *kit)
if (m_runParameters.isCppDebugging)
m_runParameters.cppEngineType = DebuggerKitInformation::engineType(kit);
Runnable r = runnable();
if (r.is<StandardRunnable>()) {
m_runParameters.inferior = r.as<StandardRunnable>();
// Normalize to work around QTBUG-17529 (QtDeclarative fails with 'File name case mismatch'...)
m_runParameters.inferior.workingDirectory =
FileUtils::normalizePathName(m_runParameters.inferior.workingDirectory);
setUseTerminal(m_runParameters.inferior.runMode == ApplicationLauncher::Console);
}
const QByteArray envBinary = qgetenv("QTC_DEBUGGER_PATH");
if (!envBinary.isEmpty())
m_runParameters.debugger.executable = QString::fromLocal8Bit(envBinary);
......
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