diff options
Diffstat (limited to 'tests/auto/linguist/lupdate/testlupdate.h')
-rw-r--r-- | tests/auto/linguist/lupdate/testlupdate.h | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/tests/auto/linguist/lupdate/testlupdate.h b/tests/auto/linguist/lupdate/testlupdate.h new file mode 100644 index 0000000..3fd7dcb --- /dev/null +++ b/tests/auto/linguist/lupdate/testlupdate.h @@ -0,0 +1,46 @@ +#ifndef TESTLUPDATE_H +#define TESTLUPDATE_H + +#include <QObject> +#include <QProcess> +#include <QStringList> + +class TestLUpdate : public QObject +{ + Q_OBJECT + +public: + TestLUpdate(); + virtual ~TestLUpdate(); + + void setWorkingDirectory( const QString &workDir); + bool run( const QString &commandline); + bool updateProFile( const QString &arguments); + bool qmake(); + QStringList getErrorMessages() { + return make_result; + } + void clearResult() { + make_result.clear(); + } +private: + QString m_cmdLupdate; + QString m_cmdQMake; + QString m_workDir; + QProcess *childProc; + QStringList env_list; + QStringList make_result; + + bool child_show; + bool qws_mode; + bool exit_ok; + + bool runChild( bool showOutput, const QString &program, const QStringList &argList = QStringList()); + void addMakeResult( const QString &result ); + void childHasData(); + +private slots: + void childReady(int exitCode); +}; + +#endif // TESTLUPDATE_H |