Python: initialize run configuration with kit python

Change-Id: I85ebe906bee2d9bc88c443f0189a685ac97ee30d
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
David Schulz
2023-11-01 09:42:48 +01:00
parent f5e12237a2
commit 024f653806

View File

@@ -8,6 +8,7 @@
#include "pysidebuildconfiguration.h" #include "pysidebuildconfiguration.h"
#include "pysideuicextracompiler.h" #include "pysideuicextracompiler.h"
#include "pythonconstants.h" #include "pythonconstants.h"
#include "pythonkitaspect.h"
#include "pythonlanguageclient.h" #include "pythonlanguageclient.h"
#include "pythonproject.h" #include "pythonproject.h"
#include "pythonsettings.h" #include "pythonsettings.h"
@@ -365,6 +366,9 @@ public:
x11Forwarding.setMacroExpander(macroExpander()); x11Forwarding.setMacroExpander(macroExpander());
x11Forwarding.setVisible(HostOsInfo::isAnyUnixHost()); x11Forwarding.setVisible(HostOsInfo::isAnyUnixHost());
if (const std::optional<Interpreter> kitPython = PythonKitAspect::python(target->kit()))
interpreter.setCurrentInterpreter(*kitPython);
setCommandLineGetter([this] { setCommandLineGetter([this] {
CommandLine cmd{interpreter.currentInterpreter().command}; CommandLine cmd{interpreter.currentInterpreter().command};
if (!buffered()) if (!buffered())