From 72420889aa54342da4472683e67e2c70b76a170f Mon Sep 17 00:00:00 2001 From: Ulf Hermann Date: Fri, 24 Jan 2014 12:44:49 +0100 Subject: Add dedicated QML profiler and adapter The remaining "profiling" parts of the QML profiler service are engine specific and are best accessed through their own adapter. Change-Id: Idb763104bdd80e4dabdf132ec1a496b9bc9f6f46 Reviewed-by: Kai Koehne --- src/qml/qml/qqmlengine.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src/qml/qml/qqmlengine.cpp') diff --git a/src/qml/qml/qqmlengine.cpp b/src/qml/qml/qqmlengine.cpp index 68d021b5cb..d373c00574 100644 --- a/src/qml/qml/qqmlengine.cpp +++ b/src/qml/qml/qqmlengine.cpp @@ -556,7 +556,7 @@ DEFINE_BOOL_CONFIG_OPTION(qmlUseNewCompiler, QML_NEW_COMPILER) QQmlEnginePrivate::QQmlEnginePrivate(QQmlEngine *e) : propertyCapture(0), rootContext(0), isDebugging(false), - outputWarningsToStdErr(true), + profiler(0), outputWarningsToStdErr(true), cleanup(0), erroredBindings(0), inProgressCreations(0), workerScriptEngine(0), activeVME(0), activeObjectCreator(0), @@ -595,6 +595,12 @@ QQmlEnginePrivate::~QQmlEnginePrivate() (*iter)->release(); for (QHash::Iterator iter = m_compositeTypes.begin(); iter != m_compositeTypes.end(); ++iter) iter.value()->isRegisteredWithEngine = false; + delete profiler; +} + +void QQmlEnginePrivate::enableProfiler() +{ + profiler = new QQmlProfiler(); } void QQmlPrivate::qdeclarativeelement_destructor(QObject *o) -- cgit v1.2.3