aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/perforce
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/perforce')
-rw-r--r--src/plugins/perforce/perforcechecker.cpp20
-rw-r--r--src/plugins/perforce/perforcechecker.h5
2 files changed, 11 insertions, 14 deletions
diff --git a/src/plugins/perforce/perforcechecker.cpp b/src/plugins/perforce/perforcechecker.cpp
index 544a132b642..060f1c221e7 100644
--- a/src/plugins/perforce/perforcechecker.cpp
+++ b/src/plugins/perforce/perforcechecker.cpp
@@ -26,15 +26,13 @@
#include "perforcechecker.h"
#include <utils/qtcassert.h>
-#include <utils/synchronousprocess.h>
-
-#include <QRegularExpression>
-#include <QTimer>
-#include <QFileInfo>
-#include <QDir>
#include <QApplication>
#include <QCursor>
+#include <QDir>
+#include <QFileInfo>
+#include <QRegularExpression>
+#include <QTimer>
namespace Perforce {
namespace Internal {
@@ -90,7 +88,8 @@ void PerforceChecker::start(const QString &binary, const QString &workingDirecto
if (!workingDirectory.isEmpty())
m_process.setWorkingDirectory(workingDirectory);
- m_process.start(m_binary, args);
+ m_process.setCommand({m_binary, args});
+ m_process.start();
m_process.closeWriteChannel();
// Timeout handling
m_timeOutMS = timeoutMS;
@@ -109,9 +108,8 @@ void PerforceChecker::slotTimeOut()
if (!isRunning())
return;
m_timedOut = true;
- Utils::SynchronousProcess::stopProcess(m_process);
- emitFailed(tr("\"%1\" timed out after %2 ms.").
- arg(m_binary).arg(m_timeOutMS));
+ m_process.stopProcess();
+ emitFailed(tr("\"%1\" timed out after %2 ms.").arg(m_binary).arg(m_timeOutMS));
}
void PerforceChecker::slotError(QProcess::ProcessError error)
@@ -129,7 +127,7 @@ void PerforceChecker::slotError(QProcess::ProcessError error)
case QProcess::ReadError:
case QProcess::WriteError:
case QProcess::UnknownError:
- Utils::SynchronousProcess::stopProcess(m_process);
+ m_process.stopProcess();
break;
}
}
diff --git a/src/plugins/perforce/perforcechecker.h b/src/plugins/perforce/perforcechecker.h
index ed346ab4311..c4d90d3009d 100644
--- a/src/plugins/perforce/perforcechecker.h
+++ b/src/plugins/perforce/perforcechecker.h
@@ -25,8 +25,7 @@
#pragma once
-#include <QObject>
-#include <QProcess>
+#include <utils/qtcprocess.h>
namespace Perforce {
namespace Internal {
@@ -68,7 +67,7 @@ private:
void parseOutput(const QString &);
inline void resetOverrideCursor();
- QProcess m_process;
+ Utils::QtcProcess m_process;
QString m_binary;
int m_timeOutMS = -1;
bool m_timedOut = false;