diff options
author | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2020-01-02 13:08:21 +0100 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2020-01-03 14:59:20 +0100 |
commit | 3a9251e8691f77c849c93f8d40784fae77f0a923 (patch) | |
tree | 5dceeb8cbbc4166126c176de6ab74f7ecee06573 /tests/auto/corelib/serialization/json/tst_qtjson.cpp | |
parent | 1d7d88f31267fcd9d63644c8ac30966c4b1a17bb (diff) |
Fix parameter of QJsonObject::const_iterator operator-(const_iterator)
It used to be "iterator", causing a qdoc warning:
src/corelib/serialization/qjsonobject.cpp:1405: (qdoc) warning: clang found diagnostics parsing \fn int QJsonObject::const_iterator::operator-(const_iterator other) const
error: out-of-line definition of 'operator-' does not match any declaration in 'QJsonObject::const_iterator'
Add a small test.
Change-Id: Id65effffa720ed1e0fb0ee6937dcc4298f3ef363
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'tests/auto/corelib/serialization/json/tst_qtjson.cpp')
-rw-r--r-- | tests/auto/corelib/serialization/json/tst_qtjson.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/tests/auto/corelib/serialization/json/tst_qtjson.cpp b/tests/auto/corelib/serialization/json/tst_qtjson.cpp index 57aa67c142..45f815f810 100644 --- a/tests/auto/corelib/serialization/json/tst_qtjson.cpp +++ b/tests/auto/corelib/serialization/json/tst_qtjson.cpp @@ -527,6 +527,8 @@ void tst_QtJson::testObjectSmallKeys() QVERIFY(data1.contains(QStringLiteral("123"))); QCOMPARE(data1.value(QStringLiteral("123")).type(), QJsonValue::Double); QCOMPARE(data1.value(QStringLiteral("123")).toDouble(), (double)323); + QCOMPARE(data1.constEnd() - data1.constBegin(), 3); + QCOMPARE(data1.end() - data1.begin(), 3); } void tst_QtJson::testArraySimple() |