forked from qt-creator/qt-creator
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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user