forked from qt-creator/qt-creator
QmlProfiler: managing several modelproxies in timeline
Change-Id: I74f3bf8dddd3840f2d6de183dedd23cc3e0a3ba9 Reviewed-by: Kai Koehne <kai.koehne@digia.com>
This commit is contained in:
committed by
Kai Koehne
parent
2340cce7cc
commit
8236143edf
@@ -30,15 +30,21 @@
|
||||
#include "qmlprofilerplugin.h"
|
||||
|
||||
#include "qmlprofilertool.h"
|
||||
#include "abstracttimelinemodel.h"
|
||||
|
||||
#include <analyzerbase/analyzermanager.h>
|
||||
#include <extensionsystem/pluginmanager.h>
|
||||
|
||||
#include <QtPlugin>
|
||||
|
||||
|
||||
|
||||
using namespace Analyzer;
|
||||
using namespace QmlProfiler;
|
||||
using namespace QmlProfiler::Internal;
|
||||
|
||||
bool QmlProfilerPlugin::debugOutput = false;
|
||||
QmlProfilerPlugin *QmlProfilerPlugin::instance = 0;
|
||||
|
||||
bool QmlProfilerPlugin::initialize(const QStringList &arguments, QString *errorString)
|
||||
{
|
||||
@@ -49,15 +55,14 @@ bool QmlProfilerPlugin::initialize(const QStringList &arguments, QString *errorS
|
||||
modes.append(StartMode(StartLocal));
|
||||
modes.append(StartMode(StartRemote));
|
||||
AnalyzerManager::addTool(new QmlProfilerTool(this), modes);
|
||||
QmlProfilerPlugin::instance = this;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
void QmlProfilerPlugin::extensionsInitialized()
|
||||
{
|
||||
// Retrieve objects from the plugin manager's object pool.
|
||||
// "In the extensionsInitialized method, a plugin can be sure that all
|
||||
// plugins that depend on it are completely initialized."
|
||||
timelineModels = ExtensionSystem::PluginManager::getObjects<AbstractTimelineModel>();
|
||||
}
|
||||
|
||||
ExtensionSystem::IPlugin::ShutdownFlag QmlProfilerPlugin::aboutToShutdown()
|
||||
@@ -68,5 +73,11 @@ ExtensionSystem::IPlugin::ShutdownFlag QmlProfilerPlugin::aboutToShutdown()
|
||||
return SynchronousShutdown;
|
||||
}
|
||||
|
||||
QList<AbstractTimelineModel *> QmlProfilerPlugin::getModels() const
|
||||
{
|
||||
return timelineModels;
|
||||
}
|
||||
|
||||
|
||||
Q_EXPORT_PLUGIN(QmlProfilerPlugin)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user