Document and further test that QJsonObject::keys() is sorted.
Change-Id: I6b145c1240cce85ad3fea6fb90ddbed629487f83 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
This commit is contained in:
parent
51ce5b4829
commit
fe1726fd7d
@ -223,6 +223,8 @@ QVariantMap QJsonObject::toVariantMap() const
|
||||
|
||||
/*!
|
||||
Returns a list of all keys in this object.
|
||||
|
||||
The list is sorted lexographically.
|
||||
*/
|
||||
QStringList QJsonObject::keys() const
|
||||
{
|
||||
|
@ -1051,6 +1051,8 @@ void tst_QtJson::keySorting()
|
||||
QCOMPARE(it.key(), QLatin1String("A"));
|
||||
++it;
|
||||
QCOMPARE(it.key(), QLatin1String("B"));
|
||||
|
||||
QCOMPARE(o.keys(), QStringList() << QLatin1String("A") << QLatin1String("B"));
|
||||
}
|
||||
|
||||
void tst_QtJson::undefinedValues()
|
||||
|
Loading…
Reference in New Issue
Block a user