summaryrefslogtreecommitdiff
path: root/src/plugins/perforce
diff options
context:
space:
mode:
authorhjk <hjk@qt.io>2022-06-16 10:17:33 +0200
committerhjk <hjk@qt.io>2022-06-16 08:26:10 +0000
commit152b14207ce264222557665c568907931e9277d8 (patch)
treebbebe25943bab6fdc39d3e661b70febda4d79ea5 /src/plugins/perforce
parentbfad59ade006fd704439c229bbb37ffc560cd243 (diff)
downloadqt-creator-152b14207ce264222557665c568907931e9277d8.tar.gz
Replace QtcProcess::stopProcess() by stop() plus waitForFinished
... or nothing, if the process object is destroyed immediately. Change-Id: I6a1e1928bc49fc20a1c0e0ee9b8f4f723276bbca Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
Diffstat (limited to 'src/plugins/perforce')
-rw-r--r--src/plugins/perforce/perforcechecker.cpp3
-rw-r--r--src/plugins/perforce/perforceplugin.cpp3
2 files changed, 4 insertions, 2 deletions
diff --git a/src/plugins/perforce/perforcechecker.cpp b/src/plugins/perforce/perforcechecker.cpp
index 2e53d1e538..3dc7f73d50 100644
--- a/src/plugins/perforce/perforcechecker.cpp
+++ b/src/plugins/perforce/perforcechecker.cpp
@@ -107,7 +107,8 @@ void PerforceChecker::slotTimeOut()
if (!isRunning())
return;
m_timedOut = true;
- m_process.stopProcess();
+ m_process.stop();
+ m_process.waitForFinished();
emitFailed(tr("\"%1\" timed out after %2 ms.").arg(m_binary.toUserOutput()).arg(m_timeOutMS));
}
diff --git a/src/plugins/perforce/perforceplugin.cpp b/src/plugins/perforce/perforceplugin.cpp
index b415b21967..4c7039d260 100644
--- a/src/plugins/perforce/perforceplugin.cpp
+++ b/src/plugins/perforce/perforceplugin.cpp
@@ -1329,7 +1329,8 @@ PerforceResponse PerforcePluginPrivate::fullySynchronousProcess(const FilePath &
QByteArray stdErr;
const int timeOutS = (flags & LongTimeOut) ? m_settings.longTimeOutS() : m_settings.timeOutS.value();
if (!process.readDataFromProcess(timeOutS, &stdOut, &stdErr, true)) {
- process.stopProcess();
+ process.stop();
+ process.waitForFinished();
response.error = true;
response.message = msgTimeout(timeOutS);
return response;