getCommandResult():
reset result if necessary (for instance for showing current result in GUI.
This commit is contained in:
@@ -7,22 +7,24 @@
|
||||
#include <QString>
|
||||
#include <QStringList>
|
||||
#include <QProcess>
|
||||
#include <QMutex>
|
||||
|
||||
|
||||
class Command : public QObject {
|
||||
Q_OBJECT
|
||||
|
||||
QString m_command;
|
||||
QString m_commandResult;
|
||||
mutable QString m_commandResult;
|
||||
int m_waitForStartTimeout;
|
||||
int m_waitForFinishTimeout;
|
||||
int m_exitCode;
|
||||
mutable QMutex m_mtx;
|
||||
public:
|
||||
explicit Command(QString const &command,
|
||||
int start_timeout = 100000,
|
||||
int finish_timeout = 100000);
|
||||
|
||||
QString getCommandResult() const;
|
||||
QString getCommandResult(bool reset = false) const;
|
||||
QString command() const { return m_command; }
|
||||
|
||||
bool execute(QString workingDirectory, QStringList args = QStringList());
|
||||
|
Reference in New Issue
Block a user