QmlProfiler: reworked

Change-Id: I66a236a024d76e7bef6edfb91ae30b5dd098b76b
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
This commit is contained in:
Christiaan Janssen
2013-08-08 13:28:08 +02:00
parent 7764f35107
commit 0a3b20f5f9
62 changed files with 7925 additions and 3138 deletions

View File

@@ -31,8 +31,10 @@
#include "qmlprofilerruncontrolfactory.h"
#include "qmlprofilertool.h"
#include "abstracttimelinemodel.h"
#include <analyzerbase/analyzermanager.h>
#include <extensionsystem/pluginmanager.h>
#include <QtPlugin>
@@ -48,6 +50,7 @@ public:
};
bool QmlProfilerPlugin::debugOutput = false;
QmlProfilerPlugin *QmlProfilerPlugin::instance = 0;
bool QmlProfilerPlugin::initialize(const QStringList &arguments, QString *errorString)
{
@@ -81,15 +84,14 @@ bool QmlProfilerPlugin::initialize(const QStringList &arguments, QString *errorS
AnalyzerManager::addAction(action);
addAutoReleasedObject(new QmlProfilerRunControlFactory());
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()
@@ -100,8 +102,12 @@ ExtensionSystem::IPlugin::ShutdownFlag QmlProfilerPlugin::aboutToShutdown()
return SynchronousShutdown;
}
QList<AbstractTimelineModel *> QmlProfilerPlugin::getModels() const
{
return timelineModels;
}
} // namespace Internal
} // namespace QmlProfiler
Q_EXPORT_PLUGIN(QmlProfiler::Internal::QmlProfilerPlugin)