diff options
Diffstat (limited to 'src/plugins/autotest/testcodeparser.h')
-rw-r--r-- | src/plugins/autotest/testcodeparser.h | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/src/plugins/autotest/testcodeparser.h b/src/plugins/autotest/testcodeparser.h index 867a6349e6..ad1788221f 100644 --- a/src/plugins/autotest/testcodeparser.h +++ b/src/plugins/autotest/testcodeparser.h @@ -34,15 +34,14 @@ #include <QFutureWatcher> #include <QTimer> -namespace Core { -class Id; -} - QT_BEGIN_NAMESPACE class QThreadPool; QT_END_NAMESPACE namespace Autotest { + +class ITestFramework; + namespace Internal { class TestCodeParser : public QObject @@ -56,12 +55,13 @@ public: Shutdown }; - explicit TestCodeParser(TestTreeModel *parent = nullptr); + TestCodeParser(); + void setState(State state); State state() const { return m_parserState; } bool isParsing() const { return m_parserState == PartialParse || m_parserState == FullParse; } void setDirty() { m_dirty = true; } - void syncTestFrameworks(const QList<Core::Id> &frameworkIds); + void syncTestFrameworks(const QList<ITestFramework *> &frameworks); #ifdef WITH_TESTS bool furtherParsingExpected() const { return m_singleShotScheduled || m_fullUpdatePostponed || m_partialUpdatePostponed; } @@ -73,10 +73,12 @@ signals: void parsingStarted(); void parsingFinished(); void parsingFailed(); + void requestRemoval(const QString &filePath); + void requestRemoveAll(); public: void emitUpdateTestTree(ITestParser *parser = nullptr); - void updateTestTree(const QSet<Core::Id> &frameworkIds = {}); + void updateTestTree(const QSet<ITestFramework *> &frameworks = {}); void onCppDocumentUpdated(const CPlusPlus::Document::Ptr &document); void onQmlDocumentUpdated(const QmlJS::Document::Ptr &document); void onStartupProjectChanged(ProjectExplorer::Project *project); @@ -86,19 +88,17 @@ public: private: bool postponed(const QStringList &fileList); void scanForTests(const QStringList &fileList = QStringList(), - const QList<Core::Id> &parserIds = {}); + const QList<ITestFramework *> &parserIds = {}); // qml files must be handled slightly different void onDocumentUpdated(const QString &fileName, bool isQmlFile = false); - void onTaskStarted(Core::Id type); - void onAllTasksFinished(Core::Id type); + void onTaskStarted(Utils::Id type); + void onAllTasksFinished(Utils::Id type); void onFinished(); void onPartialParsingFinished(); void parsePostponedFiles(); void releaseParserInternals(); - TestTreeModel *m_model; - bool m_codeModelParsing = false; bool m_fullUpdatePostponed = false; bool m_partialUpdatePostponed = false; @@ -110,7 +110,7 @@ private: QFutureWatcher<TestParseResultPtr> m_futureWatcher; QList<ITestParser *> m_testCodeParsers; // ptrs are still owned by TestFrameworkManager QTimer m_reparseTimer; - QSet<Core::Id> m_updateParsers; + QSet<ITestFramework *> m_updateParsers; QThreadPool *m_threadPool = nullptr; }; |