diff options
author | Thiago Macieira <thiago.macieira@intel.com> | 2018-01-24 13:31:04 -0800 |
---|---|---|
committer | Thiago Macieira <thiago.macieira@intel.com> | 2018-03-02 04:06:33 +0000 |
commit | 4e02c8d5b89966a97703b6fe548937b9e94f7441 (patch) | |
tree | 043bf6fce1fcd11070dff5f9d5dd4dc34497fdbf /tests/auto/corelib/serialization | |
parent | a2ffb35ac2354735a95b21557a762aa16d7140a3 (diff) |
JSON: remove braces from UUID text representations
[ChangeLog][QtCore][QJsonValue] fromVariant() conversion now converts
from QUrl and QUuid using special encoding forms to ensure best JSON
compatibility.
Change-Id: I56b444f9d6274221a3b7fffd150cdc5ca1f87ff1
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'tests/auto/corelib/serialization')
-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 19e53ad2b6..99bdd8deb0 100644 --- a/tests/auto/corelib/serialization/json/tst_qtjson.cpp +++ b/tests/auto/corelib/serialization/json/tst_qtjson.cpp @@ -1184,6 +1184,8 @@ void tst_QtJson::fromVariantSpecial_data() // Qt types with special encoding QTest::newRow("url") << QVariant(QUrl("https://example.com/\xc2\xa9 ")) << QJsonValue("https://example.com/%C2%A9%20"); + QTest::newRow("uuid") << QVariant(QUuid(0x40c01df6, 0x1ad5, 0x4762, 0x9c, 0xfe, 0xfd, 0xba, 0xfa, 0xb5, 0xde, 0xf8)) + << QJsonValue("40c01df6-1ad5-4762-9cfe-fdbafab5def8"); } void tst_QtJson::fromVariantSpecial() |