diff options
author | Ulf Hermann <ulf.hermann@theqtcompany.com> | 2015-07-20 18:15:05 +0200 |
---|---|---|
committer | Ulf Hermann <ulf.hermann@theqtcompany.com> | 2015-07-29 14:36:20 +0000 |
commit | 7784327e71f4d4f727e2d59733fa68122a85997a (patch) | |
tree | 68b0119a100f56e6a39aa682eeb0b6921354a773 /src/qml/debugger | |
parent | c81ff41a16af05f8500bec383d09f83755addde7 (diff) |
Use QVector rather than QList for storing QQmlProfilerData
Change-Id: I94519181e915c5e2df9614ad4e1180fb159252e3
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Diffstat (limited to 'src/qml/debugger')
-rw-r--r-- | src/qml/debugger/qqmlprofiler.cpp | 10 | ||||
-rw-r--r-- | src/qml/debugger/qqmlprofiler_p.h | 8 |
2 files changed, 9 insertions, 9 deletions
diff --git a/src/qml/debugger/qqmlprofiler.cpp b/src/qml/debugger/qqmlprofiler.cpp index b35da8a714..6c656f20e0 100644 --- a/src/qml/debugger/qqmlprofiler.cpp +++ b/src/qml/debugger/qqmlprofiler.cpp @@ -91,8 +91,8 @@ QQmlProfilerAdapter::QQmlProfilerAdapter(QQmlProfilerService *service, QQmlEngin connect(this, SIGNAL(dataRequested()), engine->profiler, SLOT(reportData())); connect(this, SIGNAL(referenceTimeKnown(QElapsedTimer)), engine->profiler, SLOT(setTimer(QElapsedTimer))); - connect(engine->profiler, SIGNAL(dataReady(QList<QQmlProfilerData>)), - this, SLOT(receiveData(QList<QQmlProfilerData>))); + connect(engine->profiler, SIGNAL(dataReady(QVector<QQmlProfilerData>)), + this, SLOT(receiveData(QVector<QQmlProfilerData>))); } qint64 QQmlProfilerAdapter::sendMessages(qint64 until, QList<QByteArray> &messages) @@ -104,7 +104,7 @@ qint64 QQmlProfilerAdapter::sendMessages(qint64 until, QList<QByteArray> &messag return data.empty() ? -1 : data.front().time; } -void QQmlProfilerAdapter::receiveData(const QList<QQmlProfilerData> &new_data) +void QQmlProfilerAdapter::receiveData(const QVector<QQmlProfilerData> &new_data) { data = new_data; service->dataReady(this); @@ -113,7 +113,7 @@ void QQmlProfilerAdapter::receiveData(const QList<QQmlProfilerData> &new_data) QQmlProfiler::QQmlProfiler() : featuresEnabled(0) { - static int metatype = qRegisterMetaType<QList<QQmlProfilerData> >(); + static int metatype = qRegisterMetaType<QVector<QQmlProfilerData> >(); Q_UNUSED(metatype); m_timer.start(); } @@ -132,7 +132,7 @@ void QQmlProfiler::stopProfiling() void QQmlProfiler::reportData() { - QList<QQmlProfilerData> result; + QVector<QQmlProfilerData> result; result.reserve(m_data.size()); for (int i = 0; i < m_data.size(); ++i) result.append(m_data[i]); diff --git a/src/qml/debugger/qqmlprofiler_p.h b/src/qml/debugger/qqmlprofiler_p.h index 5c994b112f..71efa69490 100644 --- a/src/qml/debugger/qqmlprofiler_p.h +++ b/src/qml/debugger/qqmlprofiler_p.h @@ -171,7 +171,7 @@ public slots: void setTimer(const QElapsedTimer &timer) { m_timer = timer; } signals: - void dataReady(const QList<QQmlProfilerData> &); + void dataReady(const QVector<QQmlProfilerData> &); protected: QElapsedTimer m_timer; @@ -185,10 +185,10 @@ public: qint64 sendMessages(qint64 until, QList<QByteArray> &messages); public slots: - void receiveData(const QList<QQmlProfilerData> &new_data); + void receiveData(const QVector<QQmlProfilerData> &new_data); private: - QList<QQmlProfilerData> data; + QVector<QQmlProfilerData> data; }; // @@ -332,6 +332,6 @@ private: }; QT_END_NAMESPACE -Q_DECLARE_METATYPE(QList<QQmlProfilerData>) +Q_DECLARE_METATYPE(QVector<QQmlProfilerData>) #endif // QQMLPROFILER_P_H |