aboutsummaryrefslogtreecommitdiffstats
path: root/tools/qmlprofiler/qmlprofilerclient.cpp
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@qt.io>2025-10-14 14:53:30 +0200
committerUlf Hermann <ulf.hermann@qt.io>2025-10-15 21:25:48 +0200
commit01e1130dbc399b258a8de9f49e7b744f0ae9b87a (patch)
tree4e39865af2c964d89a78013cd13b87bca3d53671 /tools/qmlprofiler/qmlprofilerclient.cpp
parent02e70b274d252fa2107f4b33c0d6db7fee47ad2e (diff)
QmlDebug: Move QmlProfilerData to the QmlDebug library
We want the default XML format for profiling data to be available to all debug clients since we will need it in other places. This also clarifies the interface of the event receiver and opens the path to having another implementation that produces the .qzt format. Change-Id: I4b0cd263a85996f61f2d3d14bdda616bd44e95b2 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Olivier De Cannière <olivier.decanniere@qt.io>
Diffstat (limited to 'tools/qmlprofiler/qmlprofilerclient.cpp')
-rw-r--r--tools/qmlprofiler/qmlprofilerclient.cpp15
1 files changed, 7 insertions, 8 deletions
diff --git a/tools/qmlprofiler/qmlprofilerclient.cpp b/tools/qmlprofiler/qmlprofilerclient.cpp
index e8c565261c..8fdcf3f5e6 100644
--- a/tools/qmlprofiler/qmlprofilerclient.cpp
+++ b/tools/qmlprofiler/qmlprofilerclient.cpp
@@ -2,7 +2,6 @@
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
#include "qmlprofilerclient.h"
-#include "qmlprofilerdata.h"
#include <private/qqmlprofilerclient_p_p.h>
@@ -15,19 +14,19 @@ class QmlProfilerClientPrivate : public QQmlProfilerClientPrivate
{
Q_DECLARE_PUBLIC(QmlProfilerClient)
public:
- QmlProfilerClientPrivate(QQmlDebugConnection *connection, QmlProfilerData *data);
+ QmlProfilerClientPrivate(QQmlDebugConnection *connection, QQmlProfilerEventReceiver *data);
- QmlProfilerData *data;
+ QQmlProfilerEventReceiver *data;
bool enabled;
};
QmlProfilerClientPrivate::QmlProfilerClientPrivate(QQmlDebugConnection *connection,
- QmlProfilerData *data) :
+ QQmlProfilerEventReceiver *data) :
QQmlProfilerClientPrivate(connection, data), data(data), enabled(false)
{
}
-QmlProfilerClient::QmlProfilerClient(QQmlDebugConnection *connection, QmlProfilerData *data) :
+QmlProfilerClient::QmlProfilerClient(QQmlDebugConnection *connection, QQmlProfilerEventReceiver *data) :
QQmlProfilerClient(*(new QmlProfilerClientPrivate(connection, data)))
{
Q_D(QmlProfilerClient);
@@ -35,11 +34,11 @@ QmlProfilerClient::QmlProfilerClient(QQmlDebugConnection *connection, QmlProfile
connect(this, &QQmlDebugClient::stateChanged,
this, &QmlProfilerClient::onStateChanged);
connect(this, &QQmlProfilerClient::traceStarted,
- d->data, &QmlProfilerData::setTraceStartTime);
+ d->data, &QQmlProfilerEventReceiver::startTrace);
connect(this, &QQmlProfilerClient::traceFinished,
- d->data, &QmlProfilerData::setTraceEndTime);
+ d->data, &QQmlProfilerEventReceiver::endTrace);
connect(this, &QQmlProfilerClient::complete,
- d->data, &QmlProfilerData::complete);
+ d->data, &QQmlProfilerEventReceiver::complete);
}
void QmlProfilerClient::onStateChanged(State state)