File indexing completed on 2024-05-12 04:39:28
0001 /* 0002 SPDX-FileCopyrightText: 2012 Miha Čančula <miha@noughmad.eu> 0003 0004 SPDX-License-Identifier: GPL-2.0-or-later 0005 */ 0006 0007 #ifndef CTESTRUNJOB_H 0008 #define CTESTRUNJOB_H 0009 0010 #include <outputview/outputjob.h> 0011 #include <interfaces/itestsuite.h> 0012 #include <interfaces/itestcontroller.h> 0013 0014 #include <QPointer> 0015 0016 class CTestSuite; 0017 0018 namespace KDevelop { 0019 class OutputModel; 0020 } 0021 0022 class CTestRunJob : public KJob 0023 { 0024 Q_OBJECT 0025 public: 0026 CTestRunJob(CTestSuite* suite, const QStringList& cases, KDevelop::OutputJob::OutputJobVerbosity verbosity, QObject* parent = nullptr); 0027 void start() override; 0028 0029 protected: 0030 bool doKill() override; 0031 0032 private Q_SLOTS: 0033 void processFinished(KJob* job); 0034 void rowsInserted(const QModelIndex &parent, int startRow, int endRow); 0035 0036 private: 0037 CTestSuite* m_suite; 0038 QStringList m_cases; 0039 QHash<QString, KDevelop::TestResult::TestCaseResult> m_caseResults; 0040 QPointer<KJob> m_job; 0041 KDevelop::OutputModel* m_outputModel; 0042 KDevelop::OutputJob::OutputJobVerbosity m_verbosity; 0043 }; 0044 0045 #endif // CTESTRUNJOB_H