author | insilmaril |
Thu Jun 01 11:19:57 2006 +0000 (2006-06-01) | |
changeset 343 | f5c1cdf79e6e |
parent 0 | 7a96bd401351 |
child 408 | c2a05fa925a1 |
permissions | -rw-r--r-- |
1 #include "process.h"
3 /////////////////////////////////////////////////////////////////
4 // Process
5 /////////////////////////////////////////////////////////////////
6 Process::Process()
7 {
8 connect( this, SIGNAL(readyReadStderr()),
9 this, SLOT(readProcErrout()) );
10 connect( this, SIGNAL(readyReadStdout()),
11 this, SLOT(readProcStdout()) );
12 clear();
13 }
15 Process::~Process()
16 {
17 }
19 void Process::clear()
20 {
21 errOut="";
22 stdOut="";
23 }
25 void Process::waitFinished()
26 {
27 while (isRunning())
28 {
29 // FIXME use some kind of sleep here...
30 system ("sleep 1");
31 }
32 }
34 void Process::readProcErrout()
35 {
36 errOut+=readStderr();
37 }
39 void Process::readProcStdout()
40 {
41 stdOut+=readStdout();
42 }
44 QString Process::getErrout()
45 {
46 return errOut;
47 }
49 QString Process::getStdout()
50 {
51 return stdOut;
52 }