forked from qt-creator/qt-creator
AutoTest: Use setupFunction for TestSettingsPage
Change-Id: Ib592b3fd92480a5e712cf7cd69d4b5c899a1f216 Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
This commit is contained in:
@@ -94,8 +94,6 @@ public:
|
||||
void onRunUnderCursorTriggered(TestRunMode mode);
|
||||
void onDisableTemporarily(bool disable);
|
||||
|
||||
TestSettingsPage m_testSettingPage;
|
||||
|
||||
TestCodeParser m_testCodeParser;
|
||||
TestTreeModel m_testTreeModel{&m_testCodeParser};
|
||||
TestRunner m_testRunner;
|
||||
@@ -506,6 +504,8 @@ public:
|
||||
|
||||
void initialize() final
|
||||
{
|
||||
setupTestSettingsPage();
|
||||
|
||||
dd = new AutotestPluginPrivate;
|
||||
#ifdef WITH_TESTS
|
||||
ExtensionSystem::PluginManager::registerScenario("TestModelManagerInterface",
|
||||
|
||||
@@ -10,6 +10,8 @@
|
||||
#include "testsettings.h"
|
||||
#include "testtreemodel.h"
|
||||
|
||||
#include <coreplugin/dialogs/ioptionspage.h>
|
||||
|
||||
#include <utils/algorithm.h>
|
||||
#include <utils/id.h>
|
||||
#include <utils/infolabel.h>
|
||||
@@ -253,14 +255,23 @@ void TestSettingsWidget::onFrameworkItemChanged()
|
||||
|
||||
// TestSettingsPage
|
||||
|
||||
TestSettingsPage::TestSettingsPage()
|
||||
class TestSettingsPage final : public Core::IOptionsPage
|
||||
{
|
||||
public:
|
||||
TestSettingsPage()
|
||||
{
|
||||
setId(Constants::AUTOTEST_SETTINGS_ID);
|
||||
setDisplayName(Tr::tr("General"));
|
||||
setCategory(Constants::AUTOTEST_SETTINGS_CATEGORY);
|
||||
setDisplayCategory(Tr::tr("Testing"));
|
||||
setCategoryIconPath(":/autotest/images/settingscategory_autotest.png");
|
||||
setWidgetCreator([] { return new TestSettingsWidget; });
|
||||
}
|
||||
};
|
||||
|
||||
void setupTestSettingsPage()
|
||||
{
|
||||
static TestSettingsPage theTestSettingsPage;
|
||||
}
|
||||
|
||||
} // Autotest::Internal
|
||||
|
||||
@@ -3,14 +3,8 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <coreplugin/dialogs/ioptionspage.h>
|
||||
|
||||
namespace Autotest::Internal {
|
||||
|
||||
class TestSettingsPage : public Core::IOptionsPage
|
||||
{
|
||||
public:
|
||||
TestSettingsPage();
|
||||
};
|
||||
void setupTestSettingsPage();
|
||||
|
||||
} // Autotest::Internal
|
||||
|
||||
Reference in New Issue
Block a user