aboutsummaryrefslogtreecommitdiffstats
path: root/tools/qmlprofiler/qmlprofilerdata.h
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@qt.io>2017-12-14 20:06:57 +0100
committerUlf Hermann <ulf.hermann@qt.io>2018-02-02 09:38:46 +0000
commitb82296f825daf0ba110fea4aa1b61f96d63f371b (patch)
treeb4d0101fcc6992c4d567b9fafe2c7ec855b915a5 /tools/qmlprofiler/qmlprofilerdata.h
parent65606ea1559572d66ee8bfac77e87f3e8f447c3e (diff)
Use better QmlProfiler client from Qt Creator
This client can track locations itself, and thus doesn't require the server to send the event types over and over with each message. Once all our client implementations have this feature we can drop a lot of code. Furthermore, this way we can write regression tests for bugs that only occur when client side location tracking is active. Change-Id: I3735392452e20a7be98e92b900fadef04701d85f Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'tools/qmlprofiler/qmlprofilerdata.h')
-rw-r--r--tools/qmlprofiler/qmlprofilerdata.h23
1 files changed, 8 insertions, 15 deletions
diff --git a/tools/qmlprofiler/qmlprofilerdata.h b/tools/qmlprofiler/qmlprofilerdata.h
index 00ef037071..2be0b73aee 100644
--- a/tools/qmlprofiler/qmlprofilerdata.h
+++ b/tools/qmlprofiler/qmlprofilerdata.h
@@ -29,13 +29,14 @@
#ifndef QMLPROFILERDATA_H
#define QMLPROFILERDATA_H
-#include <private/qqmleventlocation_p.h>
#include <private/qqmlprofilerdefinitions_p.h>
+#include <private/qqmlprofilereventlocation_p.h>
+#include <private/qqmlprofilereventreceiver_p.h>
#include <QObject>
class QmlProfilerDataPrivate;
-class QmlProfilerData : public QObject
+class QmlProfilerData : public QQmlProfilerEventReceiver
{
Q_OBJECT
public:
@@ -49,7 +50,11 @@ public:
explicit QmlProfilerData(QObject *parent = 0);
~QmlProfilerData();
- static QString getHashStringForQmlEvent(const QQmlEventLocation &location, int eventType);
+ int numLoadedEventTypes() const override;
+ void addEventType(const QQmlProfilerEventType &type) override;
+ void addEvent(const QQmlProfilerEvent &event) override;
+
+ static QString getHashStringForQmlEvent(const QQmlProfilerEventLocation &location, int eventType);
static QString qmlRangeTypeAsString(QQmlProfilerDefinitions::RangeType type);
static QString qmlMessageAsString(QQmlProfilerDefinitions::Message type);
@@ -61,18 +66,6 @@ public:
void clear();
void setTraceEndTime(qint64 time);
void setTraceStartTime(qint64 time);
- void addQmlEvent(QQmlProfilerDefinitions::RangeType type,
- QQmlProfilerDefinitions::BindingType bindingType,
- qint64 startTime, qint64 duration, const QStringList &data,
- const QQmlEventLocation &location);
- void addFrameEvent(qint64 time, int framerate, int animationcount, int threadId);
- void addSceneGraphFrameEvent(QQmlProfilerDefinitions::SceneGraphFrameType type, qint64 time,
- qint64 numericData1, qint64 numericData2, qint64 numericData3,
- qint64 numericData4, qint64 numericData5);
- void addPixmapCacheEvent(QQmlProfilerDefinitions::PixmapEventType type, qint64 time,
- const QString &location, int numericData1, int numericData2);
- void addMemoryEvent(QQmlProfilerDefinitions::MemoryType type, qint64 time, qint64 size);
- void addInputEvent(QQmlProfilerDefinitions::InputEventType type, qint64 time, int a, int b);
void complete();
bool save(const QString &filename);