forked from qt-creator/qt-creator
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 <christian.stenger@qt.io> Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
committed by
Orgad Shaneh
parent
81c5906970
commit
b67bf73dc7
@@ -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);
|
||||
|
Reference in New Issue
Block a user