comparison hgrunner.cpp @ 43:c32067cd19f8

* Some experiments towards a graph history view
author Chris Cannam
date Sun, 07 Nov 2010 19:59:54 +0000
parents 45bfb8dc1faf
children bed7ab59f62e
comparison
equal deleted inserted replaced
42:9a89dedf260a 43:c32067cd19f8
4 4
5 #include "hgrunner.h" 5 #include "hgrunner.h"
6 #include <QtCore> 6 #include <QtCore>
7 #include <QtGui> 7 #include <QtGui>
8 8
9 #include <iostream>
9 #include <unistd.h> 10 #include <unistd.h>
10 11
11 HgRunner::HgRunner(QWidget * parent): QProgressBar(parent) 12 HgRunner::HgRunner(QWidget * parent): QProgressBar(parent)
12 { 13 {
13 proc = new QProcess(this); 14 proc = new QProcess(this);
38 { 39 {
39 exitCode = procExitCode; 40 exitCode = procExitCode;
40 exitStatus = procExitStatus; 41 exitStatus = procExitStatus;
41 stdOut = proc -> readAllStandardOutput(); 42 stdOut = proc -> readAllStandardOutput();
42 stdErr = proc -> readAllStandardError(); 43 stdErr = proc -> readAllStandardError();
44 std::cerr << "stdout was " << stdOut.toStdString() << std::endl;
43 } 45 }
44 46
45 void HgRunner::presentErrorToUser() 47 void HgRunner::presentErrorToUser()
46 { 48 {
47 QPushButton *okButton; 49 QPushButton *okButton;
147 } 149 }
148 150
149 lastHgCommand = hgExePathAndName; 151 lastHgCommand = hgExePathAndName;
150 lastParams = params.join(" "); 152 lastParams = params.join(" ");
151 153
154 std::cerr << "HgRunner: starting: " << hgExePathAndName.toStdString();
155 foreach (QString param, params) std::cerr << param.toStdString() << " ";
156 std::cerr << std::endl;
157
152 proc -> start(hgExePathAndName, params); 158 proc -> start(hgExePathAndName, params);
153 159
154 } 160 }
155 161
156 int HgRunner::getExitCode() 162 int HgRunner::getExitCode()