summaryrefslogtreecommitdiff
path: root/src/plugins/python/pythonutils.cpp
diff options
context:
space:
mode:
authorhjk <hjk@qt.io>2021-05-04 07:32:40 +0200
committerhjk <hjk@qt.io>2021-05-04 09:55:47 +0000
commit4c375e31a3498b5ad1652465b7ae3b3fed6d5c82 (patch)
treec4ac3e70faad54bc1ac57e9384ec7663b7ed5ad3 /src/plugins/python/pythonutils.cpp
parent90ff9be54a87fb0d7ddbfdfe0245b05aa9927d25 (diff)
downloadqt-creator-4c375e31a3498b5ad1652465b7ae3b3fed6d5c82.tar.gz
Python: Replace a use of SynchronousProcess
Change-Id: I93ce9a3224c88c69c3b0ef46f1416645ffca1e1e Reviewed-by: David Schulz <david.schulz@qt.io>
Diffstat (limited to 'src/plugins/python/pythonutils.cpp')
-rw-r--r--src/plugins/python/pythonutils.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/plugins/python/pythonutils.cpp b/src/plugins/python/pythonutils.cpp
index 56b2dbe6db..d10d6d2ce5 100644
--- a/src/plugins/python/pythonutils.cpp
+++ b/src/plugins/python/pythonutils.cpp
@@ -46,6 +46,7 @@
#include <utils/infobar.h>
#include <utils/mimetypes/mimedatabase.h>
#include <utils/qtcassert.h>
+#include <utils/qtcprocess.h>
#include <utils/runextensions.h>
#include <utils/synchronousprocess.h>
@@ -267,7 +268,8 @@ public:
if (!QDir(m_python.parentDir().toString()).exists("activate"))
arguments << "--user";
- m_process.start(m_python.toString(), arguments);
+ m_process.setCommand({m_python, arguments});
+ m_process.start();
Core::MessageManager::writeDisrupting(
tr("Running \"%1 %2\" to install Python language server")
@@ -280,7 +282,7 @@ public:
private:
void cancel()
{
- SynchronousProcess::stopProcess(m_process);
+ m_process.stopProcess();
Core::MessageManager::writeFlashing(
tr("The Python language server installation was canceled by %1.")
.arg(m_killTimer.isActive() ? tr("user") : tr("time out")));
@@ -315,7 +317,7 @@ private:
QFutureInterface<void> m_future;
QFutureWatcher<void> m_watcher;
- QProcess m_process;
+ QtcProcess m_process;
QTimer m_killTimer;
const FilePath m_python;
QPointer<TextEditor::TextDocument> m_document;