ssu
process.h
Go to the documentation of this file.
1 
8 #ifndef _PROCESS_H
9 #define _PROCESS_H
10 
11 #include <QtCore/QProcess>
12 
13 class Process
14 {
15 public:
16  enum ExpectedResult {
17  ExpectSuccess,
18  ExpectFail
19  };
20 
21 public:
22  Process();
23 
24  QString execute(const QString &program, const QStringList &arguments,
25  bool expectedResult = ExpectSuccess);
26  bool hasError();
27  QString fmtErrorMessage();
28 
29 private:
30  QProcess m_process;
31  QString m_program;
32  QStringList m_arguments;
33  bool m_expectFail;
34  bool m_timedOut;
35 };
36 
37 #endif
Process
Definition: process.h:13