aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/python/pythonutils.cpp
diff options
context:
space:
mode:
authorJarek Kobus <jaroslaw.kobus@qt.io>2024-01-22 17:27:24 +0100
committerJarek Kobus <jaroslaw.kobus@qt.io>2024-01-22 20:27:51 +0000
commitafc67468e699da6d274bb5678fab1cda80ef1212 (patch)
treea593f83175e0c2682eacf5d082d87350fbf0efb5 /src/plugins/python/pythonutils.cpp
parentf6be85b1d2762951dffa77d5b7f03199eb795f35 (diff)
Process: Get rid of setTimeoutS()
Add an extra arg to runBlocking() function instead. Use std::chrono::seconds for timeout. Change-Id: I7c3c21e8f26a2ccbed157d15083d6ef0b4cd2f7e Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Diffstat (limited to 'src/plugins/python/pythonutils.cpp')
-rw-r--r--src/plugins/python/pythonutils.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/plugins/python/pythonutils.cpp b/src/plugins/python/pythonutils.cpp
index a786a559053..d355800e0a4 100644
--- a/src/plugins/python/pythonutils.cpp
+++ b/src/plugins/python/pythonutils.cpp
@@ -148,9 +148,8 @@ QString pythonName(const FilePath &pythonPath)
QString name = nameForPython.value(pythonPath);
if (name.isEmpty()) {
Process pythonProcess;
- pythonProcess.setTimeoutS(2);
pythonProcess.setCommand({pythonPath, {"--version"}});
- pythonProcess.runBlocking();
+ pythonProcess.runBlocking(std::chrono::seconds(2));
if (pythonProcess.result() != ProcessResult::FinishedWithSuccess)
return {};
name = pythonProcess.allOutput().trimmed();