forked from qt-creator/qt-creator
QmlProfiler: Move action registration out of QmlProfilerTool
This enables us to have multiple QmlProfilerTool instances without conflicting action registrations. Ultimately there should be a way to unregister actions, or to add some extra description on which tool instance they refer to, but this is a minimal first step. The main problem this fixes for now is the warnings generated by the tests. Change-Id: I2193fc48a5a68c52f46e5567919f3035bc93df36 Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
This commit is contained in:
@@ -30,6 +30,7 @@
|
||||
#include "qmlprofilersettings.h"
|
||||
#include "qmlprofilertool.h"
|
||||
#include "qmlprofilertimelinemodel.h"
|
||||
#include "qmlprofileractions.h"
|
||||
|
||||
#ifdef WITH_TESTS
|
||||
|
||||
@@ -84,6 +85,7 @@ class QmlProfilerPluginPrivate
|
||||
public:
|
||||
QmlProfilerTool m_profilerTool;
|
||||
QmlProfilerOptionsPage m_profilerOptionsPage;
|
||||
QmlProfilerActions m_actions;
|
||||
};
|
||||
|
||||
bool QmlProfilerPlugin::initialize(const QStringList &arguments, QString *errorString)
|
||||
@@ -99,6 +101,8 @@ bool QmlProfilerPlugin::initialize(const QStringList &arguments, QString *errorS
|
||||
void QmlProfilerPlugin::extensionsInitialized()
|
||||
{
|
||||
d = new QmlProfilerPluginPrivate;
|
||||
d->m_actions.attachToTool(&d->m_profilerTool);
|
||||
d->m_actions.registerActions();
|
||||
|
||||
RunConfiguration::registerAspect<QmlProfilerRunConfigurationAspect>();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user