save for christmas

This commit is contained in:
2024-12-20 13:01:34 +01:00
parent 2ec7b61682
commit 7bfb7f5a3b
19 changed files with 624 additions and 92 deletions

View File

@@ -9,7 +9,7 @@
#include <QProcess>
#include <QMutex>
class Worker;
class Command : public QObject {
Q_OBJECT
@@ -19,6 +19,8 @@ class Command : public QObject {
int m_waitForFinishTimeout;
int m_exitCode;
mutable QMutex m_mtx;
QProcess *m_p;
Worker *m_worker;
public:
explicit Command(QString const &command,
int start_timeout = 100000,
@@ -28,8 +30,11 @@ public:
QString command() const { return m_command; }
bool execute(QString workingDirectory, QStringList args = QStringList());
bool start(QString workingDirectory, QStringList args = QStringList());
int exitCode() const { return m_exitCode; }
void setWorker(Worker *worker) {m_worker = worker; }
private slots:
void readyReadStandardOutput();
void readyReadStandardError();