File tree Expand file tree Collapse file tree 2 files changed +12
-22
lines changed Expand file tree Collapse file tree 2 files changed +12
-22
lines changed Original file line number Diff line number Diff line change @@ -30,27 +30,6 @@ static const int maxSimultaneousProcesses = 100;
3030typedef unsigned long long mark_t ;
3131static const mark_t maxMark = ULONG_MAX;
3232
33- LoggingQProcess::LoggingQProcess (const QString filename)
34- : QProcess(), log()
35- {
36- if (CommandLineParser::instance ()->contains (" debug-rules" )) {
37- logging = true ;
38- QString name = filename;
39- name.replace (' /' , ' _' );
40- name.prepend (" gitlog-" );
41- log.setFileName (name);
42- log.open (QIODevice::WriteOnly);
43- } else {
44- logging = false ;
45- }
46-
47- // Trigger a crictical error if any error in the process happens
48- connect (this , &QProcess::errorOccurred, this ,
49- [this ](QProcess::ProcessError error) {
50- qCritical () << " Error happened in fast import process, error code: '" << error <<" '" ;
51- });
52- };
53-
5433class FastImportRepository : public Repository
5534{
5635public:
Original file line number Diff line number Diff line change @@ -31,7 +31,18 @@ class LoggingQProcess : public QProcess
3131 QFile log;
3232 bool logging;
3333public:
34- LoggingQProcess (const QString filename);
34+ LoggingQProcess (const QString filename) : QProcess(), log() {
35+ if (CommandLineParser::instance ()->contains (" debug-rules" )) {
36+ logging = true ;
37+ QString name = filename;
38+ name.replace (' /' , ' _' );
39+ name.prepend (" gitlog-" );
40+ log.setFileName (name);
41+ log.open (QIODevice::WriteOnly);
42+ } else {
43+ logging = false ;
44+ }
45+ };
3546 ~LoggingQProcess () {
3647 if (logging) {
3748 log.close ();
You can’t perform that action at this time.
0 commit comments