Abstract QProcess interface

Abstract part of QProcess interface into ProcessInterface
pure virtual class. The current API of ProcessInterface
is a part of QProcess API used currently to implement
QtcProcess. Provide 2 implementations for it: QProcessImpl
which uses QProcess and ProcessLauncherImpl which is currently
empty implementation with assertions that no method is being
called. Provide an additional switch to QtcProcess c'tor
for selecting the preferred implementation, by default it
selects QProcessImpl. This change doesn't influence any behavior.

Change-Id: Ia5328401affe127f3d36870be8478202d4143480
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
Jarek Kobus
2021-07-09 09:09:05 +02:00
parent 39b8501fa1
commit bbe44bf42a
2 changed files with 229 additions and 18 deletions

View File

@@ -59,6 +59,12 @@ class QTCREATOR_UTILS_EXPORT QtcProcess : public QObject
Q_OBJECT
public:
enum ProcessImpl {
QProcessImpl,
ProcessLauncherImpl
};
QtcProcess(ProcessImpl processImpl, QObject *parent = nullptr);
QtcProcess(QObject *parent = nullptr);
~QtcProcess();