qmlprofiler: simplify plugin construction

Change-Id: I26fe148669656637a82a30012e8632b105d4f073
Reviewed-on: http://codereview.qt.nokia.com/1050
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: hjk <qthjk@ovi.com>
This commit is contained in:
hjk
2011-06-30 14:39:15 +02:00
committed by hjk
parent 99d9f065b3
commit daefb0c83a
3 changed files with 3 additions and 28 deletions

View File

@@ -45,27 +45,14 @@ using namespace QmlProfiler::Internal;
bool QmlProfilerPlugin::debugOutput = false;
class QmlProfilerPlugin::QmlProfilerPluginPrivate
{
public:
QmlProjectAnalyzerRunControlFactory *m_runControlFactory;
};
QmlProfilerPlugin::QmlProfilerPlugin()
: d(new QmlProfilerPluginPrivate())
{}
QmlProfilerPlugin::~QmlProfilerPlugin()
{
delete d;
}
bool QmlProfilerPlugin::initialize(const QStringList &arguments, QString *errorString)
{
Q_UNUSED(arguments)
Q_UNUSED(errorString)
d->m_runControlFactory = new QmlProjectAnalyzerRunControlFactory();
AnalyzerManager::registerRunControlFactory(d->m_runControlFactory);
addAutoReleasedObject(new QmlProjectAnalyzerRunControlFactory());
AnalyzerManager::addTool(new QmlProfilerTool(true, this));
AnalyzerManager::addTool(new QmlProfilerTool(false, this));
return true;