diff options
author | hjk <hjk@qt.io> | 2021-05-28 14:48:25 +0200 |
---|---|---|
committer | hjk <hjk@qt.io> | 2021-06-14 13:31:05 +0000 |
commit | fe7d6f0defbfb287e6bb2205aa446965d731672c (patch) | |
tree | b80f247dd6b2263ccfdcbdda3674a247a48ce62f /src/plugins/python | |
parent | 9426ce99a1f33447e07ce6d2e1860bee753fb018 (diff) |
Utils: Drop QProcess specific parameters from QtcProcess::finished()
Mid-term plan is to concentrate on use of QtcProcess::result()
instead which is a bit more system-agnostic.
There's quite a bit of potential for downstream cleanup by
re-using QtcProcess::exitMessage() now.
Change-Id: I3806b3f5933d96e64b7cfb18cc6c52823fddcbcd
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Diffstat (limited to 'src/plugins/python')
-rw-r--r-- | src/plugins/python/pythonutils.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/plugins/python/pythonutils.cpp b/src/plugins/python/pythonutils.cpp index 8744502c827..af1c42b5ab9 100644 --- a/src/plugins/python/pythonutils.cpp +++ b/src/plugins/python/pythonutils.cpp @@ -292,15 +292,16 @@ private: .arg(m_killTimer.isActive() ? tr("user") : tr("time out"))); } - void installFinished(int exitCode, QProcess::ExitStatus exitStatus) + void installFinished() { m_future.reportFinished(); - if (exitStatus == QProcess::NormalExit && exitCode == 0) { + if (m_process.result() == QtcProcess::FinishedWithSuccess) { if (Client *client = registerLanguageServer(m_python)) LanguageClientManager::openDocumentWithClient(m_document, client); } else { Core::MessageManager::writeFlashing( - tr("Installing the Python language server failed with exit code %1").arg(exitCode)); + tr("Installing the Python language server failed with exit code %1") + .arg(m_process.exitCode())); } deleteLater(); } |