diff --git a/src/plugins/pythoneditor/pythoneditorplugin.cpp b/src/plugins/pythoneditor/pythoneditorplugin.cpp index 889880dc863..d07c68cd9a0 100644 --- a/src/plugins/pythoneditor/pythoneditorplugin.cpp +++ b/src/plugins/pythoneditor/pythoneditorplugin.cpp @@ -299,11 +299,12 @@ void PythonRunConfiguration::updateTargetInformation() Runnable PythonRunConfiguration::runnable() const { + CommandLine cmd{executable(), {}}; + cmd.addArg(mainScript()); + cmd.addArgs(aspect()->arguments(macroExpander())); + Runnable r; - QtcProcess::addArg(&r.commandLineArguments, mainScript()); - QtcProcess::addArgs(&r.commandLineArguments, - aspect()->arguments(macroExpander())); - r.executable = executable().toString(); + r.setCommandLine(cmd); r.environment = aspect()->environment(); return r; }