Changeset View
Changeset View
Standalone View
Standalone View
plugins/cmake/testing/ctestrunjob.h
Show All 20 Lines | |||||
21 | #define CTESTRUNJOB_H | 21 | #define CTESTRUNJOB_H | ||
22 | 22 | | |||
23 | #include <outputview/outputjob.h> | 23 | #include <outputview/outputjob.h> | ||
24 | #include <interfaces/itestsuite.h> | 24 | #include <interfaces/itestsuite.h> | ||
25 | #include <interfaces/itestcontroller.h> | 25 | #include <interfaces/itestcontroller.h> | ||
26 | 26 | | |||
27 | class CTestSuite; | 27 | class CTestSuite; | ||
28 | 28 | | |||
29 | namespace KDevelop { | ||||
30 | class OutputModel; | ||||
31 | } | ||||
32 | | ||||
29 | class CTestRunJob : public KJob | 33 | class CTestRunJob : public KJob | ||
30 | { | 34 | { | ||
31 | Q_OBJECT | 35 | Q_OBJECT | ||
32 | public: | 36 | public: | ||
33 | CTestRunJob(CTestSuite* suite, const QStringList& cases, KDevelop::OutputJob::OutputJobVerbosity verbosity, QObject* parent = nullptr); | 37 | CTestRunJob(CTestSuite* suite, const QStringList& cases, KDevelop::OutputJob::OutputJobVerbosity verbosity, QObject* parent = nullptr); | ||
34 | void start() override; | 38 | void start() override; | ||
35 | 39 | | |||
36 | protected: | 40 | protected: | ||
37 | bool doKill() override; | 41 | bool doKill() override; | ||
38 | 42 | | |||
39 | private Q_SLOTS: | 43 | private Q_SLOTS: | ||
40 | void processFinished(KJob* job); | 44 | void processFinished(KJob* job); | ||
41 | void rowsInserted(const QModelIndex &parent, int startRow, int endRow); | 45 | void rowsInserted(const QModelIndex &parent, int startRow, int endRow); | ||
42 | 46 | | |||
43 | private: | 47 | private: | ||
44 | CTestSuite* m_suite; | 48 | CTestSuite* m_suite; | ||
45 | QStringList m_cases; | 49 | QStringList m_cases; | ||
46 | QHash<QString, KDevelop::TestResult::TestCaseResult> m_caseResults; | 50 | QHash<QString, KDevelop::TestResult::TestCaseResult> m_caseResults; | ||
47 | KJob* m_job; | 51 | KJob* m_job; | ||
48 | KDevelop::OutputJob* m_outputJob; | 52 | KDevelop::OutputModel* m_outputModel; | ||
49 | KDevelop::OutputJob::OutputJobVerbosity m_verbosity; | 53 | KDevelop::OutputJob::OutputJobVerbosity m_verbosity; | ||
50 | }; | 54 | }; | ||
51 | 55 | | |||
52 | #endif // CTESTRUNJOB_H | 56 | #endif // CTESTRUNJOB_H |