aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/python/pythonsettings.cpp
diff options
context:
space:
mode:
authorDavid Schulz <david.schulz@qt.io>2025-12-11 08:22:14 +0100
committerDavid Schulz <david.schulz@qt.io>2025-12-17 05:55:30 +0000
commit8824c6f6e28f08dd36a8b80a40a0821fd19d2b3a (patch)
treef6fdbaf0eed9dcd4a40c5e50efa2e708aee3b926 /src/plugins/python/pythonsettings.cpp
parentc4e506b7853f9dc6f5422a745652f5be283228f2 (diff)
Python: use DataFromProcess to fetch python version outputHEADmaster
and remove duplicated calls and caches Change-Id: I39f73354035f2ad427e7f2360ccba7143aeb2b84 Reviewed-by: hjk <hjk@qt.io>
Diffstat (limited to 'src/plugins/python/pythonsettings.cpp')
-rw-r--r--src/plugins/python/pythonsettings.cpp8
1 files changed, 1 insertions, 7 deletions
diff --git a/src/plugins/python/pythonsettings.cpp b/src/plugins/python/pythonsettings.cpp
index 6c257aa2c90..fde31e692f1 100644
--- a/src/plugins/python/pythonsettings.cpp
+++ b/src/plugins/python/pythonsettings.cpp
@@ -129,13 +129,7 @@ Interpreter PythonSettings::createInterpreter(
result.command = python;
result.detectionSource = detectionSource;
- Process pythonProcess;
- pythonProcess.setProcessChannelMode(QProcess::MergedChannels);
- pythonProcess.setCommand({python, {"--version"}});
- using namespace std::chrono_literals;
- pythonProcess.runBlocking(1s);
- if (pythonProcess.result() == ProcessResult::FinishedWithSuccess)
- result.name = pythonProcess.cleanedStdOut().trimmed();
+ result.name = pythonVersion(python);
if (result.name.isEmpty())
result.name = defaultName;
QDir pythonDir(python.parentDir().toUrlishString());