Uploaded image for project: 'Qt Creator'
  1. Qt Creator
  2. QTCREATORBUG-27358

Refactor ProcessInterface

    XMLWordPrintable

Details

    • All

    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

        Activity

          People

            jkobus Jarek Kobus
            jkobus Jarek Kobus
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews