diff options
author | Ulf Hermann <ulf.hermann@qt.io> | 2018-11-01 11:02:35 +0100 |
---|---|---|
committer | Ulf Hermann <ulf.hermann@qt.io> | 2018-11-15 14:14:04 +0000 |
commit | 0647853c1659515684da1fb0f44d12eac993dc69 (patch) | |
tree | 13b3b733444b7a7ce4e84aa78acbbeaea9df4dd4 /tests | |
parent | e668e12c58c489bda79cc3c116719369cdb06650 (diff) |
Qml Tooling: Fix crash in QQmlProfilerService test
The event counting for failure diagnostics had an off-by-one error.
Change-Id: I7f652680a4d154a0624dbfd51af0b026f89cc7ad
Reviewed-by: Michael Brasser <michael.brasser@live.com>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/auto/qml/debugger/qqmlprofilerservice/tst_qqmlprofilerservice.cpp | 4 |
1 files changed, 2 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..9d76158c5b 100644 --- a/tests/auto/qml/debugger/qqmlprofilerservice/tst_qqmlprofilerservice.cpp +++ b/tests/auto/qml/debugger/qqmlprofilerservice/tst_qqmlprofilerservice.cpp @@ -373,7 +373,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 +448,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(); |