From c0cce829b5b8e343713ed34dcf290bdb783054a1 Mon Sep 17 00:00:00 2001 From: hjk Date: Thu, 9 Feb 2023 15:07:54 +0100 Subject: [PATCH] AutoTest: Use new test object setup Change-Id: Icf750f084d8c2b5c34e62dfedd62bc785406d590 Reviewed-by: Christian Stenger Reviewed-by: Qt CI Bot Reviewed-by: --- src/plugins/autotest/autotestplugin.cpp | 11 ++--------- src/plugins/autotest/autotestplugin.h | 3 --- 2 files changed, 2 insertions(+), 12 deletions(-) diff --git a/src/plugins/autotest/autotestplugin.cpp b/src/plugins/autotest/autotestplugin.cpp index faf4da67173..98b804b16d3 100644 --- a/src/plugins/autotest/autotestplugin.cpp +++ b/src/plugins/autotest/autotestplugin.cpp @@ -283,6 +283,8 @@ void AutotestPlugin::initialize() #ifdef WITH_TESTS ExtensionSystem::PluginManager::registerScenario("TestModelManagerInterface", [] { return dd->m_loadProjectScenario(); }); + + addTest(&dd->m_testTreeModel); #endif } @@ -540,15 +542,6 @@ void AutotestPlugin::popupResultsPane() dd->m_resultsPane->popup(Core::IOutputPane::NoModeSwitch); } -QVector AutotestPlugin::createTestObjects() const -{ - QVector tests; -#ifdef WITH_TESTS - tests << new AutoTestUnitTests(&dd->m_testTreeModel); -#endif - return tests; -} - bool ChoicePair::matches(const ProjectExplorer::RunConfiguration *rc) const { return rc && rc->displayName() == displayName && rc->runnable().command.executable() == executable; diff --git a/src/plugins/autotest/autotestplugin.h b/src/plugins/autotest/autotestplugin.h index f6b8b337af5..8705a8a538d 100644 --- a/src/plugins/autotest/autotestplugin.h +++ b/src/plugins/autotest/autotestplugin.h @@ -51,9 +51,6 @@ public: static ChoicePair cachedChoiceFor(const QString &buildTargetKey); static void clearChoiceCache(); static void popupResultsPane(); - -private: - QVector createTestObjects() const override; }; } // namespace Internal