adding commnds to execute
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
#ifndef COMMAND_H_INCLUDED
|
||||
#define COMMAND_H_INCLUDED
|
||||
#endif // COMMAND_H_INCLUDED
|
||||
|
||||
#include <QObject>
|
||||
#include <QCoreApplication>
|
||||
@@ -13,14 +12,24 @@ class Worker;
|
||||
class Command : public QObject {
|
||||
Q_OBJECT
|
||||
|
||||
protected:
|
||||
QString m_command;
|
||||
mutable QString m_commandResult;
|
||||
|
||||
private:
|
||||
int m_waitForStartTimeout;
|
||||
int m_waitForFinishTimeout;
|
||||
int m_exitCode;
|
||||
|
||||
protected:
|
||||
mutable QMutex m_mtx;
|
||||
|
||||
private:
|
||||
QProcess *m_p;
|
||||
|
||||
protected:
|
||||
Worker *m_worker;
|
||||
|
||||
public:
|
||||
explicit Command(QString const &command,
|
||||
int start_timeout = 100000,
|
||||
@@ -35,8 +44,10 @@ public:
|
||||
|
||||
void setWorker(Worker *worker) {m_worker = worker; }
|
||||
|
||||
private slots:
|
||||
protected slots:
|
||||
void readyReadStandardOutput();
|
||||
void readyReadStandardError();
|
||||
void finished(int exitCode, QProcess::ExitStatus exitStatus);
|
||||
virtual void finished(int exitCode, QProcess::ExitStatus exitStatus);
|
||||
};
|
||||
|
||||
#endif // COMMAND_H_INCLUDED
|
||||
|
Reference in New Issue
Block a user