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/pythonlanguageclient.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/pythonlanguageclient.cpp')
| -rw-r--r-- | src/plugins/python/pythonlanguageclient.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
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()}; |
