diff options
| author | Jarek Kobus <jaroslaw.kobus@qt.io> | 2024-01-22 17:27:24 +0100 |
|---|---|---|
| committer | Jarek Kobus <jaroslaw.kobus@qt.io> | 2024-01-22 20:27:51 +0000 |
| commit | afc67468e699da6d274bb5678fab1cda80ef1212 (patch) | |
| tree | a593f83175e0c2682eacf5d082d87350fbf0efb5 /src/plugins/python/pythonsettings.cpp | |
| parent | f6be85b1d2762951dffa77d5b7f03199eb795f35 (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/pythonsettings.cpp')
| -rw-r--r-- | src/plugins/python/pythonsettings.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/plugins/python/pythonsettings.cpp b/src/plugins/python/pythonsettings.cpp index 887e5ce44b0..04a607e3ce1 100644 --- a/src/plugins/python/pythonsettings.cpp +++ b/src/plugins/python/pythonsettings.cpp @@ -70,9 +70,8 @@ static Interpreter createInterpreter(const FilePath &python, Process pythonProcess; pythonProcess.setProcessChannelMode(QProcess::MergedChannels); - pythonProcess.setTimeoutS(1); pythonProcess.setCommand({python, {"--version"}}); - pythonProcess.runBlocking(); + pythonProcess.runBlocking(std::chrono::seconds(1)); if (pythonProcess.result() == ProcessResult::FinishedWithSuccess) result.name = pythonProcess.cleanedStdOut().trimmed(); if (result.name.isEmpty()) |
