From ab4689fbcb842c2a82422d9e2013b07c14d36017 Mon Sep 17 00:00:00 2001 From: Marcus Tillmanns Date: Tue, 17 Jan 2023 12:09:18 +0100 Subject: [PATCH] Autotest: Add ITestParser::supportedExtensions Change-Id: I3bb0f9b2a989cc4c9b4f6ae95d36308bc192158d Reviewed-by: Christian Stenger --- src/plugins/autotest/itestparser.h | 3 +++ src/plugins/autotest/quick/quicktestparser.h | 2 ++ src/plugins/autotest/testcodeparser.cpp | 4 ++-- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/plugins/autotest/itestparser.h b/src/plugins/autotest/itestparser.h index 22d2ddfd19c..7e16a61b90d 100644 --- a/src/plugins/autotest/itestparser.h +++ b/src/plugins/autotest/itestparser.h @@ -48,6 +48,9 @@ public: virtual void init(const Utils::FilePaths &filesToParse, bool fullParse) = 0; virtual bool processDocument(QFutureInterface &futureInterface, const Utils::FilePath &fileName) = 0; + + virtual QStringList supportedExtensions() const { return {}; } + virtual void release() = 0; ITestFramework *framework() const { return m_framework; } diff --git a/src/plugins/autotest/quick/quicktestparser.h b/src/plugins/autotest/quick/quicktestparser.h index bfb1fa20319..7fd579005bb 100644 --- a/src/plugins/autotest/quick/quicktestparser.h +++ b/src/plugins/autotest/quick/quicktestparser.h @@ -29,6 +29,8 @@ public: bool processDocument(QFutureInterface &futureInterface, const Utils::FilePath &fileName) override; Utils::FilePath projectFileForMainCppFile(const Utils::FilePath &fileName) const; + QStringList supportedExtensions() const override { return {"qml"}; }; + private: bool handleQtQuickTest(QFutureInterface &futureInterface, CPlusPlus::Document::Ptr document, ITestFramework *framework); diff --git a/src/plugins/autotest/testcodeparser.cpp b/src/plugins/autotest/testcodeparser.cpp index 1bed9bb9ab4..276450f951c 100644 --- a/src/plugins/autotest/testcodeparser.cpp +++ b/src/plugins/autotest/testcodeparser.cpp @@ -25,11 +25,11 @@ #include #include -static Q_LOGGING_CATEGORY(LOG, "qtc.autotest.testcodeparser", QtWarningMsg) - namespace Autotest { namespace Internal { +Q_LOGGING_CATEGORY(LOG, "qtc.autotest.testcodeparser", QtWarningMsg) + using namespace ProjectExplorer; TestCodeParser::TestCodeParser()