diff options
author | Ulf Hermann <ulf.hermann@theqtcompany.com> | 2015-11-04 15:38:48 +0100 |
---|---|---|
committer | Ulf Hermann <ulf.hermann@theqtcompany.com> | 2015-11-17 16:18:12 +0000 |
commit | e010b64d38cb8533d779ac0fe8d609f00a6793e7 (patch) | |
tree | 11ff569fe3cee0832b96832bad108b5df9aeb3a0 /src/plugins/qmltooling/qmldbg_profiler/qqmlprofilerservice.cpp | |
parent | fcc5a39d60b14e8ec2345b3695b84b552501dfa1 (diff) |
QmlDebug: move QQuickProfiler into a plugin
This saves some code in QtQuick and allows us to split up QPacket into
different versions for client and server.
Change-Id: I9b8c723274fb11d6321c5002910148b193aa6b40
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Diffstat (limited to 'src/plugins/qmltooling/qmldbg_profiler/qqmlprofilerservice.cpp')
-rw-r--r-- | src/plugins/qmltooling/qmldbg_profiler/qqmlprofilerservice.cpp | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/plugins/qmltooling/qmldbg_profiler/qqmlprofilerservice.cpp b/src/plugins/qmltooling/qmldbg_profiler/qqmlprofilerservice.cpp index 0cf2fa0246..77503c5f06 100644 --- a/src/plugins/qmltooling/qmldbg_profiler/qqmlprofilerservice.cpp +++ b/src/plugins/qmltooling/qmldbg_profiler/qqmlprofilerservice.cpp @@ -37,6 +37,7 @@ #include "qqmlprofilerservicefactory.h" #include <private/qqmlengine_p.h> #include <private/qpacket_p.h> +#include <private/qqmldebugpluginmanager_p.h> #include <QtCore/qdatastream.h> #include <QtCore/qurl.h> @@ -46,11 +47,20 @@ QT_BEGIN_NAMESPACE +Q_QML_DEBUG_PLUGIN_LOADER(QQmlAbstractProfilerAdapter) +Q_QML_IMPORT_DEBUG_PLUGIN(QQuickProfilerAdapterFactory) + QQmlProfilerServiceImpl::QQmlProfilerServiceImpl(QObject *parent) : QQmlConfigurableDebugService<QQmlProfilerService>(1, parent), m_waitingForStop(false) { m_timer.start(); + QQmlAbstractProfilerAdapter *quickAdapter = + loadQQmlAbstractProfilerAdapter(QLatin1String("QQuickProfilerAdapter")); + if (quickAdapter) { + addGlobalProfiler(quickAdapter); + quickAdapter->setService(this); + } } QQmlProfilerServiceImpl::~QQmlProfilerServiceImpl() @@ -177,7 +187,6 @@ void QQmlProfilerServiceImpl::removeGlobalProfiler(QQmlAbstractProfilerAdapter * QMutexLocker lock(&m_configMutex); removeProfilerFromStartTimes(profiler); m_globalProfilers.removeOne(profiler); - delete profiler; } void QQmlProfilerServiceImpl::removeProfilerFromStartTimes(const QQmlAbstractProfilerAdapter *profiler) |