Details
-
Task
-
Resolution: Fixed
-
P2: Important
-
None
-
None
Description
Aim for minimal and full functional API for ProcessInterface. Preferably like this:
enum class ControlSignal { Terminate, Kill, Interrupt, KickOff }; enum class ProcessSignal { Started, ReadyRead, Done }; class QTCREATOR_UTILS_EXPORT ProcessInterface : public QObject { Q_OBJECT public: ProcessInterface(QObject *parent = nullptr) : QObject(parent) {} signals: void started(qint64 processId, qint64 appMainThreadId = -1); void done(const Utils::ProcessResultData &resultData); void readyReadStandardOutput(const QByteArray &data); void readyReadStandardError(const QByteArray &data); private: virtual void start(const ProcessSetupData &setupData) = 0; virtual qint64 write(const QByteArray &data) = 0; virtual void sendControlSignal(ControlSignal controlSignal) = 0; virtual bool waitForProcessSignal(ProcessSignal processSignal, int msecs) = 0; };
Having such an interface makes ProcessProxyInterface useless, so remove it.
Attachments
For Gerrit Dashboard: QTCREATORBUG-27358 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
405428,8 | Introduce ProcessResultData | master | qt-creator/qt-creator | Status: MERGED | +2 | 0 |
405607,8 | ProcessInterface: Add done() signal | master | qt-creator/qt-creator | Status: MERGED | +2 | 0 |
405661,7 | ProcessInterface: Add readyRead() signal | master | qt-creator/qt-creator | Status: MERGED | +2 | 0 |
405668,9 | ProcessInterface: Pass processId with started() signal | master | qt-creator/qt-creator | Status: MERGED | +2 | 0 |
405705,6 | ProcessInterface: Get rid of close() method | master | qt-creator/qt-creator | Status: MERGED | +2 | 0 |
405708,7 | ProcessInterface: Add sendControlSignal() method | master | qt-creator/qt-creator | Status: MERGED | +2 | 0 |
405741,10 | ProcessInterface: Get rid of ProcessProxyInterface | master | qt-creator/qt-creator | Status: MERGED | -1 | 0 |
405758,6 | ProcessInterface: Get rid of ProcessInterface::Ptr | master | qt-creator/qt-creator | Status: MERGED | -1 | 0 |
405805,7 | ProcessInterface: Get rid of state() method | master | qt-creator/qt-creator | Status: MERGED | -1 | 0 |