diff --git a/src/repository.cpp b/src/repository.cpp index 90da84f..b926ad4 100644 --- a/src/repository.cpp +++ b/src/repository.cpp @@ -30,27 +30,6 @@ static const int maxSimultaneousProcesses = 100; typedef unsigned long long mark_t; static const mark_t maxMark = ULONG_MAX; -LoggingQProcess::LoggingQProcess(const QString filename) - : QProcess(), log() -{ - if(CommandLineParser::instance()->contains("debug-rules")) { - logging = true; - QString name = filename; - name.replace('/', '_'); - name.prepend("gitlog-"); - log.setFileName(name); - log.open(QIODevice::WriteOnly); - } else { - logging = false; - } - - // Trigger a crictical error if any error in the process happens - connect(this, &QProcess::errorOccurred, this, - [this](QProcess::ProcessError error) { - qCritical() << "Error happened in fast import process, error code: '" << error <<"'"; - }); -}; - class FastImportRepository : public Repository { public: diff --git a/src/repository.h b/src/repository.h index e9051da..1de7517 100644 --- a/src/repository.h +++ b/src/repository.h @@ -31,7 +31,18 @@ class LoggingQProcess : public QProcess QFile log; bool logging; public: - LoggingQProcess(const QString filename); + LoggingQProcess(const QString filename) : QProcess(), log() { + if(CommandLineParser::instance()->contains("debug-rules")) { + logging = true; + QString name = filename; + name.replace('/', '_'); + name.prepend("gitlog-"); + log.setFileName(name); + log.open(QIODevice::WriteOnly); + } else { + logging = false; + } + }; ~LoggingQProcess() { if(logging) { log.close();