aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/qmlprofiler/qmlprofilertracefile.h
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@qt.io>2016-05-10 13:27:48 +0200
committerUlf Hermann <ulf.hermann@qt.io>2016-05-23 12:32:10 +0000
commitecd8e764dd4b5106e76d20853d336943dc7d750c (patch)
tree33b54a16212cb0101fcb172bde87abe3a157ccfd /src/plugins/qmlprofiler/qmlprofilertracefile.h
parentd6d69b811a1a09eb54b836c8c709ea97ee61ec58 (diff)
QmlProfiler: Add a binary trace format
Storing traces in binary form is preferable as loading and saving is faster and the trace files are smaller. Change-Id: Ia7340ac526d5ce9391b1e32fc48fc1fab3ffa13d Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Diffstat (limited to 'src/plugins/qmlprofiler/qmlprofilertracefile.h')
-rw-r--r--src/plugins/qmlprofiler/qmlprofilertracefile.h18
1 files changed, 10 insertions, 8 deletions
diff --git a/src/plugins/qmlprofiler/qmlprofilertracefile.h b/src/plugins/qmlprofiler/qmlprofilertracefile.h
index a1c56b09092..937ec1de298 100644
--- a/src/plugins/qmlprofiler/qmlprofilertracefile.h
+++ b/src/plugins/qmlprofiler/qmlprofilertracefile.h
@@ -35,6 +35,7 @@
#include <QVector>
#include <QString>
+QT_FORWARD_DECLARE_CLASS(QFile)
QT_FORWARD_DECLARE_CLASS(QIODevice)
QT_FORWARD_DECLARE_CLASS(QXmlStreamReader)
@@ -50,17 +51,18 @@ public:
void setFuture(QFutureInterface<void> *future);
- bool load(QIODevice *device);
+ bool loadQtd(QIODevice *device);
+ bool loadQzt(QIODevice *device);
+
quint64 loadedFeatures() const;
qint64 traceStart() const { return m_traceStart; }
qint64 traceEnd() const { return m_traceEnd; }
- const QVector<QmlEventType> &eventTypes() const { return m_eventTypes; }
- const QVector<QmlEvent> &events() const { return m_events; }
- const QVector<QmlNote> &notes() const { return m_notes; }
-
signals:
+ void typesLoaded(const QVector<QmlProfiler::QmlEventType> &types);
+ void notesLoaded(const QVector<QmlProfiler::QmlNote> &notes);
+ void qmlEventLoaded(const QmlProfiler::QmlEvent &event);
void error(const QString &error);
void success();
@@ -68,13 +70,12 @@ private:
void loadEventTypes(QXmlStreamReader &reader);
void loadEvents(QXmlStreamReader &reader);
void loadNotes(QXmlStreamReader &reader);
- void progress(QIODevice *device);
+ void updateProgress(QIODevice *device);
bool isCanceled() const;
qint64 m_traceStart, m_traceEnd;
QFutureInterface<void> *m_future;
QVector<QmlEventType> m_eventTypes;
- QVector<QmlEvent> m_events;
QVector<QmlNote> m_notes;
quint64 m_loadedFeatures;
};
@@ -92,7 +93,8 @@ public:
void setNotes(const QVector<QmlNote> &notes);
void setFuture(QFutureInterface<void> *future);
- void save(QIODevice *device);
+ void saveQtd(QIODevice *device);
+ void saveQzt(QFile *file);
private:
void calculateMeasuredTime();