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:
kostas
2012-05-12 10:43:40 +00:00
parent a2b91c8a58
commit 42ff9851f5
8 changed files with 124 additions and 95 deletions

24
LoggedProcess.h Normal file
View 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