aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qml/debugger
diff options
context:
space:
mode:
authorQt Forward Merge Bot <qt_forward_merge_bot@qt-project.org>2018-11-16 01:00:48 +0100
committerQt Forward Merge Bot <qt_forward_merge_bot@qt-project.org>2018-11-16 01:00:49 +0100
commit0ae32e678eedf7450a0d7291bfb27925874de462 (patch)
tree8ee7d6e6ae56a9963a966ffe59283675e9849b29 /tests/auto/qml/debugger
parentfe1f81484bf9d9ace1d8125498a7ce889ba5bddc (diff)
parent87265c7ab8743ece92262cd6b79bbba9dddd1fe1 (diff)
Merge remote-tracking branch 'origin/5.12' into dev
Diffstat (limited to 'tests/auto/qml/debugger')
-rw-r--r--tests/auto/qml/debugger/qqmlprofilerservice/tst_qqmlprofilerservice.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/tests/auto/qml/debugger/qqmlprofilerservice/tst_qqmlprofilerservice.cpp b/tests/auto/qml/debugger/qqmlprofilerservice/tst_qqmlprofilerservice.cpp
index 7fc43671c2..1783ded9d6 100644
--- a/tests/auto/qml/debugger/qqmlprofilerservice/tst_qqmlprofilerservice.cpp
+++ b/tests/auto/qml/debugger/qqmlprofilerservice/tst_qqmlprofilerservice.cpp
@@ -69,6 +69,9 @@ public:
int numLoadedEventTypes() const override;
void addEventType(const QQmlProfilerEventType &type) override;
void addEvent(const QQmlProfilerEvent &event) override;
+
+private:
+ qint64 lastTimestamp = -1;
};
void QQmlProfilerTestClient::startTrace(qint64 timestamp, const QList<int> &engineIds)
@@ -102,6 +105,9 @@ void QQmlProfilerTestClient::addEvent(const QQmlProfilerEvent &event)
const QQmlProfilerEventType &type = types[typeIndex];
+ QVERIFY(event.timestamp() >= lastTimestamp);
+ lastTimestamp = event.timestamp();
+
switch (type.message()) {
case Event: {
switch (type.detailType()) {
@@ -373,7 +379,7 @@ bool tst_QQmlProfilerService::verify(tst_QQmlProfilerService::MessageListType ty
return false;
}
- uint position = expectedPosition;
+ int position = expectedPosition;
qint64 timestamp = target->at(expectedPosition).timestamp();
while (position > 0 && target->at(position - 1).timestamp() == timestamp)
--position;
@@ -448,7 +454,7 @@ bool tst_QQmlProfilerService::verify(tst_QQmlProfilerService::MessageListType ty
}
return true;
- } while (target->at(++position).timestamp() == timestamp);
+ } while (++position < target->length() && target->at(position).timestamp() == timestamp);
foreach (const QString &message, warnings)
qWarning() << message.toLocal8Bit().constData();