aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/perforce
diff options
context:
space:
mode:
authorhjk <hjk@qt.io>2021-05-28 14:48:25 +0200
committerhjk <hjk@qt.io>2021-06-14 13:31:05 +0000
commitfe7d6f0defbfb287e6bb2205aa446965d731672c (patch)
treeb80f247dd6b2263ccfdcbdda3674a247a48ce62f /src/plugins/perforce
parent9426ce99a1f33447e07ce6d2e1860bee753fb018 (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/perforce')
-rw-r--r--src/plugins/perforce/perforcechecker.cpp8
-rw-r--r--src/plugins/perforce/perforcechecker.h2
2 files changed, 5 insertions, 5 deletions
diff --git a/src/plugins/perforce/perforcechecker.cpp b/src/plugins/perforce/perforcechecker.cpp
index 620fb76fcd7..5cd3c57ca98 100644
--- a/src/plugins/perforce/perforcechecker.cpp
+++ b/src/plugins/perforce/perforcechecker.cpp
@@ -133,19 +133,19 @@ void PerforceChecker::slotError(QProcess::ProcessError error)
}
}
-void PerforceChecker::slotFinished(int exitCode, QProcess::ExitStatus exitStatus)
+void PerforceChecker::slotFinished()
{
if (m_timedOut)
return;
- switch (exitStatus) {
+ switch (m_process.exitStatus()) {
case QProcess::CrashExit:
emitFailed(tr("\"%1\" crashed.").arg(QDir::toNativeSeparators(m_binary)));
break;
case QProcess::NormalExit:
- if (exitCode) {
+ if (m_process.exitCode()) {
const QString stdErr = QString::fromLocal8Bit(m_process.readAllStandardError());
emitFailed(tr("\"%1\" terminated with exit code %2: %3").
- arg(QDir::toNativeSeparators(m_binary)).arg(exitCode).arg(stdErr));
+ arg(QDir::toNativeSeparators(m_binary)).arg(m_process.exitCode()).arg(stdErr));
} else {
parseOutput(QString::fromLocal8Bit(m_process.readAllStandardOutput()));
}
diff --git a/src/plugins/perforce/perforcechecker.h b/src/plugins/perforce/perforcechecker.h
index c4d90d3009d..3232979390a 100644
--- a/src/plugins/perforce/perforcechecker.h
+++ b/src/plugins/perforce/perforcechecker.h
@@ -59,7 +59,7 @@ signals:
private:
void slotError(QProcess::ProcessError error);
- void slotFinished(int exitCode, QProcess::ExitStatus exitStatus);
+ void slotFinished();
void slotTimeOut();
void emitFailed(const QString &);