AutoTest: Use new test object setup

Change-Id: Icf750f084d8c2b5c34e62dfedd62bc785406d590
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
This commit is contained in:
hjk
2023-02-09 15:07:54 +01:00
parent 4838dead1a
commit c0cce829b5
2 changed files with 2 additions and 12 deletions

View File

@@ -283,6 +283,8 @@ void AutotestPlugin::initialize()
#ifdef WITH_TESTS #ifdef WITH_TESTS
ExtensionSystem::PluginManager::registerScenario("TestModelManagerInterface", ExtensionSystem::PluginManager::registerScenario("TestModelManagerInterface",
[] { return dd->m_loadProjectScenario(); }); [] { return dd->m_loadProjectScenario(); });
addTest<AutoTestUnitTests>(&dd->m_testTreeModel);
#endif #endif
} }
@@ -540,15 +542,6 @@ void AutotestPlugin::popupResultsPane()
dd->m_resultsPane->popup(Core::IOutputPane::NoModeSwitch); dd->m_resultsPane->popup(Core::IOutputPane::NoModeSwitch);
} }
QVector<QObject *> AutotestPlugin::createTestObjects() const
{
QVector<QObject *> tests;
#ifdef WITH_TESTS
tests << new AutoTestUnitTests(&dd->m_testTreeModel);
#endif
return tests;
}
bool ChoicePair::matches(const ProjectExplorer::RunConfiguration *rc) const bool ChoicePair::matches(const ProjectExplorer::RunConfiguration *rc) const
{ {
return rc && rc->displayName() == displayName && rc->runnable().command.executable() == executable; return rc && rc->displayName() == displayName && rc->runnable().command.executable() == executable;

View File

@@ -51,9 +51,6 @@ public:
static ChoicePair cachedChoiceFor(const QString &buildTargetKey); static ChoicePair cachedChoiceFor(const QString &buildTargetKey);
static void clearChoiceCache(); static void clearChoiceCache();
static void popupResultsPane(); static void popupResultsPane();
private:
QVector<QObject *> createTestObjects() const override;
}; };
} // namespace Internal } // namespace Internal