fuel-scm/LoggedProcess.h
kostas 42ff9851f5 Moved LoggedProcess to separate files
Added message box when attempting to push or pull when no remote url has been set


FossilOrigin-Name: 3adc2a837ceb5080094dede9f0f3bdeb0e0429f0
2012-05-12 10:43:40 +00:00

25 lines
489 B
C++

#ifndef LOGGEDPROCESS_H
#define LOGGEDPROCESS_H
#include <QProcess>
#include <QMutex>
class LoggedProcess : public QProcess
{
Q_OBJECT
public:
explicit LoggedProcess(QObject *parent = 0);
void getLogAndClear(QByteArray &buffer);
bool isLogEmpty() const { return log.isEmpty(); }
qint64 logBytesAvailable() const { return log.size(); }
private slots:
void onReadyReadStandardOutput();
private:
QMutex mutex;
QByteArray log;
};
#endif // LOGGEDPROCESS_H