Moved LoggedProcess to separate files
Added message box when attempting to push or pull when no remote url has been set FossilOrigin-Name: 3adc2a837ceb5080094dede9f0f3bdeb0e0429f0
This commit is contained in:
24
LoggedProcess.h
Normal file
24
LoggedProcess.h
Normal file
@@ -0,0 +1,24 @@
|
||||
#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
|
||||
Reference in New Issue
Block a user