forked from qt-creator/qt-creator
Provide test settings and make use of them
Change-Id: Ia6fef10bc577f9722b6c063c2df4d1651a8be50d Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
This commit is contained in:
@@ -19,6 +19,8 @@
|
||||
#include "autotestplugin.h"
|
||||
#include "autotestconstants.h"
|
||||
#include "testrunner.h"
|
||||
#include "testsettings.h"
|
||||
#include "testsettingspage.h"
|
||||
#include "testtreeview.h"
|
||||
#include "testtreemodel.h"
|
||||
#include "testresultspane.h"
|
||||
@@ -43,9 +45,13 @@
|
||||
|
||||
using namespace Autotest::Internal;
|
||||
|
||||
static AutotestPlugin *m_instance = 0;
|
||||
|
||||
AutotestPlugin::AutotestPlugin()
|
||||
: m_settings(new TestSettings)
|
||||
{
|
||||
// Create your members
|
||||
m_instance = this;
|
||||
}
|
||||
|
||||
AutotestPlugin::~AutotestPlugin()
|
||||
@@ -58,6 +64,11 @@ AutotestPlugin::~AutotestPlugin()
|
||||
delete runner;
|
||||
}
|
||||
|
||||
AutotestPlugin *AutotestPlugin::instance()
|
||||
{
|
||||
return m_instance;
|
||||
}
|
||||
|
||||
bool AutotestPlugin::initialize(const QStringList &arguments, QString *errorString)
|
||||
{
|
||||
// Register objects in the plugin manager's object pool
|
||||
@@ -90,6 +101,10 @@ bool AutotestPlugin::initialize(const QStringList &arguments, QString *errorStri
|
||||
menu->addAction(cmd);
|
||||
Core::ActionManager::actionContainer(Core::Constants::M_TOOLS)->addMenu(menu);
|
||||
|
||||
m_settings->fromSettings(Core::ICore::settings());
|
||||
TestSettingsPage *settingsPage = new TestSettingsPage(m_settings);
|
||||
addAutoReleasedObject(settingsPage);
|
||||
|
||||
addAutoReleasedObject(new TestViewFactory);
|
||||
addAutoReleasedObject(TestResultsPane::instance());
|
||||
|
||||
|
||||
Reference in New Issue
Block a user