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/pythonlanguageclient.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/plugins/python/pythonlanguageclient.cpp') diff --git a/src/plugins/python/pythonlanguageclient.cpp b/src/plugins/python/pythonlanguageclient.cpp index 8f2c799d81b..ab3cf170730 100644 --- a/src/plugins/python/pythonlanguageclient.cpp +++ b/src/plugins/python/pythonlanguageclient.cpp @@ -85,9 +85,8 @@ static PythonLanguageServerState checkPythonLanguageServer(const FilePath &pytho return {PythonLanguageServerState::AlreadyInstalled, lspPath}; Process pythonProcess; - pythonProcess.setTimeoutS(2); pythonProcess.setCommand({python, {"-m", "pip", "-V"}}); - pythonProcess.runBlocking(); + pythonProcess.runBlocking(std::chrono::seconds(2)); if (pythonProcess.allOutput().startsWith("pip ")) return {PythonLanguageServerState::CanBeInstalled, lspPath}; return {PythonLanguageServerState::CanNotBeInstalled, FilePath()}; -- cgit v1.2.3