Added message box when attempting to push or pull when no remote url has been set FossilOrigin-Name: 3adc2a837ceb5080094dede9f0f3bdeb0e0429f0
23 lines
576 B
C++
23 lines
576 B
C++
#include "LoggedProcess.h"
|
|
|
|
///////////////////////////////////////////////////////////////////////////////
|
|
LoggedProcess::LoggedProcess(QObject *parent) : QProcess(parent)
|
|
{
|
|
setProcessChannelMode(QProcess::MergedChannels);
|
|
connect(this, SIGNAL(readyReadStandardOutput()), this, SLOT(onReadyReadStandardOutput()));
|
|
}
|
|
|
|
void LoggedProcess::getLogAndClear(QByteArray &buffer)
|
|
{
|
|
QMutexLocker lck(&mutex);
|
|
buffer = log;
|
|
log.clear();
|
|
}
|
|
|
|
void LoggedProcess::onReadyReadStandardOutput()
|
|
{
|
|
QMutexLocker lck(&mutex);
|
|
log.append(readAllStandardOutput());
|
|
}
|
|
|