From afc67468e699da6d274bb5678fab1cda80ef1212 Mon Sep 17 00:00:00 2001 From: Jarek Kobus Date: Mon, 22 Jan 2024 17:27:24 +0100 Subject: 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 --- src/plugins/python/pythonutils.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/plugins/python/pythonutils.cpp') 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(); -- cgit v1.2.3