diff options
author | Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> | 2015-10-13 09:46:56 +0200 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> | 2015-10-13 18:14:27 +0000 |
commit | a2a00eb044596f3e3f628b6b20b38a5ba524915c (patch) | |
tree | efcf26def4cdf70e95134ba9b86b561346646862 /tests/auto/corelib/json | |
parent | e86f889de7a38208d0cb0a8ca4cd1fb027894b3c (diff) |
Tests: Fix single-character string literals.
Use character literals where applicable.
Change-Id: I1a026c320079ee5ca6f70be835d5a541deee2dd1
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Diffstat (limited to 'tests/auto/corelib/json')
-rw-r--r-- | tests/auto/corelib/json/tst_qtjson.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/tests/auto/corelib/json/tst_qtjson.cpp b/tests/auto/corelib/json/tst_qtjson.cpp index 1dd00f8727..e8d836683e 100644 --- a/tests/auto/corelib/json/tst_qtjson.cpp +++ b/tests/auto/corelib/json/tst_qtjson.cpp @@ -2555,8 +2555,8 @@ void tst_QtJson::nesting() QVERIFY(!doc.isNull()); QCOMPARE(error.error, QJsonParseError::NoError); - json.prepend("["); - json.append("]"); + json.prepend('['); + json.append(']'); doc = QJsonDocument::fromJson(json, &error); QVERIFY(doc.isNull()); @@ -2574,8 +2574,8 @@ void tst_QtJson::nesting() QVERIFY(!doc.isNull()); QCOMPARE(error.error, QJsonParseError::NoError); - json.prepend("["); - json.append("]"); + json.prepend('['); + json.append(']'); doc = QJsonDocument::fromJson(json, &error); QVERIFY(doc.isNull()); @@ -2589,7 +2589,7 @@ void tst_QtJson::longStrings() // in the data structures (for Latin1String in qjson_p.h) QString s(0x7ff0, 'a'); for (int i = 0x7ff0; i < 0x8010; i++) { - s.append("c"); + s.append(QLatin1Char('c')); QMap <QString, QVariant> map; map["key"] = s; @@ -2608,7 +2608,7 @@ void tst_QtJson::longStrings() s = QString(0xfff0, 'a'); for (int i = 0xfff0; i < 0x10010; i++) { - s.append("c"); + s.append(QLatin1Char('c')); QMap <QString, QVariant> map; map["key"] = s; |