comparison hgrunner.h @ 84:8a4e26dc3182

* Make all of the "Open" options do something sensible
author Chris Cannam
date Mon, 22 Nov 2010 17:27:59 +0000
parents 295e3ee4a257
children fdca34c989c0
comparison
equal deleted inserted replaced
83:af7cf6f7282c 84:8a4e26dc3182
41 int getExitCode(); 41 int getExitCode();
42 QProcess::ExitStatus getExitStatus(); 42 QProcess::ExitStatus getExitStatus();
43 43
44 void hideProgBar(); 44 void hideProgBar();
45 45
46 QString getStdOut(); 46 QString getOutput();
47 47
48 signals: 48 signals:
49 void commandCompleted(); 49 void commandCompleted();
50 void commandFailed(); 50 void commandFailed();
51 51
52 private: 52 private:
53 void saveOutput();
54 void setProcExitInfo(int procExitCode, QProcess::ExitStatus procExitStatus); 53 void setProcExitInfo(int procExitCode, QProcess::ExitStatus procExitStatus);
55 QString getLastCommandLine(); 54 QString getLastCommandLine();
56 void presentErrorToUser(); 55 void presentErrorToUser();
57 QString getHgBinaryName(); 56 QString getHgBinaryName();
57 void closeProcInput();
58 58
59 int ptyMasterFd; 59 void noteUsername(QString);
60 int ptySlaveFd; 60 void noteRealm(QString);
61 QString ptySlaveFilename; 61 void getUsername();
62 QFile *procInput; 62 void getPassword();
63 void checkPrompts(QString);
64
65 int m_ptyMasterFd;
66 int m_ptySlaveFd;
67 QString m_ptySlaveFilename;
68 QFile *m_procInput;
63 69
64 bool reportErrors; 70 bool m_isRunning;
65 bool isRunning; 71 QProcess *m_proc;
66 QProcess *proc; 72 QString m_output;
67 QString stdOut; 73 int m_exitCode;
68 QString stdErr; 74 QProcess::ExitStatus m_exitStatus;
69 int exitCode; 75 QString m_lastHgCommand;
70 QProcess::ExitStatus exitStatus; 76 QString m_lastParams;
71 QString lastHgCommand; 77
72 QString lastParams; 78 QString m_userName;
79 QString m_realm;
73 80
74 private slots: 81 private slots:
75 void started(); 82 void started();
76 void finished(int procExitCode, QProcess::ExitStatus procExitStatus); 83 void finished(int procExitCode, QProcess::ExitStatus procExitStatus);
77 void stdOutReady(); 84 void dataReady();
78 void stdErrReady();
79 }; 85 };
80 86
81 #endif // HGRUNNER_H 87 #endif // HGRUNNER_H