Promote previously python-specific InterpreterAspect

... and drop PythonRunConfiguration, which is a plain RunConfiguration now.

Change-Id: I540cb738180fc1424f730d6d1998886915ce527b
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
hjk
2022-04-13 12:26:54 +02:00
parent 9a6d8aebe7
commit 28cfdf388a
16 changed files with 327 additions and 339 deletions

View File

@@ -939,16 +939,17 @@ DebuggerRunTool::DebuggerRunTool(RunControl *runControl, AllowTerminal allowTerm
m_runParameters.nativeMixedEnabled = bool(nativeMixedOverride);
RunConfiguration *runConfig = runControl->runConfiguration();
if (runConfig && runConfig->property("supportsDebugger").toBool()) {
const QString mainScript = runConfig->property("mainScript").toString();
const QString interpreter = runConfig->property("interpreter").toString();
if (!interpreter.isEmpty() && mainScript.endsWith(".py")) {
m_runParameters.mainScript = mainScript;
m_runParameters.interpreter = interpreter;
const QString args = runConfig->property("arguments").toString();
m_runParameters.inferior.command.addArgs(args, CommandLine::Raw);
m_engine = createPdbEngine();
if (auto interpreterAspect = runControl->aspect<InterpreterAspect>()) {
if (auto mainScriptAspect = runControl->aspect<MainScriptAspect>()) {
const FilePath mainScript = mainScriptAspect->filePath;
const FilePath interpreter = interpreterAspect->interpreter.command;
if (!interpreter.isEmpty() && mainScript.endsWith(".py")) {
m_runParameters.mainScript = mainScript;
m_runParameters.interpreter = interpreter;
if (auto args = runControl->aspect<ArgumentsAspect>())
m_runParameters.inferior.command.addArgs(args->arguments, CommandLine::Raw);
m_engine = createPdbEngine();
}
}
}