diff options
author | Alex Blasche <alexander.blasche@digia.com> | 2014-05-14 14:34:34 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-05-15 14:57:31 +0200 |
commit | cb424d26eac75a14316726b4687758fd10c85563 (patch) | |
tree | 9d1b96301734b8c20652607823bb6dacb63afff8 /tests/auto | |
parent | 8922ae1ef4f0cb01c15632dfe19ed514e0d49dbe (diff) | |
download | qtlocation-cb424d26eac75a14316726b4687758fd10c85563.tar.gz |
Use QStringLiteral whereever possible
This replaces a lot of old QLatin1String cases
Change-Id: I47aec711f5e00de68bde6c2c8ee09506f577cfd4
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
Diffstat (limited to 'tests/auto')
26 files changed, 284 insertions, 284 deletions
diff --git a/tests/auto/geotestplugin/qplacemanagerengine_test.h b/tests/auto/geotestplugin/qplacemanagerengine_test.h index edcf09b7..2654f459 100644 --- a/tests/auto/geotestplugin/qplacemanagerengine_test.h +++ b/tests/auto/geotestplugin/qplacemanagerengine_test.h @@ -295,7 +295,7 @@ public: if (ro.contains(QStringLiteral("dateTime"))) review.setDateTime(QDateTime::fromString( ro.value(QStringLiteral("dateTime")).toString(), - QLatin1String("hh:mm dd-MM-yyyy"))); + QStringLiteral("hh:mm dd-MM-yyyy"))); if (ro.contains(QStringLiteral("reviewId"))) review.setReviewId(ro.value("reviewId").toString()); @@ -651,12 +651,12 @@ public: QList<QPair<int, QUrl> > candidates; QMap<QString, int> sizeDictionary; - sizeDictionary.insert(QLatin1String("s"), 20); - sizeDictionary.insert(QLatin1String("m"), 30); - sizeDictionary.insert(QLatin1String("l"), 50); + sizeDictionary.insert(QStringLiteral("s"), 20); + sizeDictionary.insert(QStringLiteral("m"), 30); + sizeDictionary.insert(QStringLiteral("l"), 50); QStringList sizeKeys; - sizeKeys << QLatin1String("s") << QLatin1String("m") << QLatin1String("l"); + sizeKeys << QStringLiteral("s") << QStringLiteral("m") << QStringLiteral("l"); foreach (const QString &sizeKey, sizeKeys) { diff --git a/tests/auto/nokia_services/places_semiauto/tst_places.cpp b/tests/auto/nokia_services/places_semiauto/tst_places.cpp index a0170144..b96e7f3b 100644 --- a/tests/auto/nokia_services/places_semiauto/tst_places.cpp +++ b/tests/auto/nokia_services/places_semiauto/tst_places.cpp @@ -660,13 +660,13 @@ void tst_QPlaceManagerNokia::content_data() void tst_QPlaceManagerNokia::unsupportedFunctions() { QPlace place; - place.setName(QLatin1String("Brisbane")); + place.setName(QStringLiteral("Brisbane")); QVERIFY(doSavePlace(place, QPlaceReply::UnsupportedError)); QVERIFY(doRemovePlace(place, QPlaceReply::UnsupportedError)); QPlaceCategory category; - category.setName(QLatin1String("Accommodation")); + category.setName(QStringLiteral("Accommodation")); QVERIFY(doSaveCategory(category, QPlaceReply::UnsupportedError)); QVERIFY(doRemoveCategory(category, QPlaceReply::UnsupportedError)); } diff --git a/tests/auto/qgeoaddress/tst_qgeoaddress.cpp b/tests/auto/qgeoaddress/tst_qgeoaddress.cpp index 9dc35d74..b43a15ca 100644 --- a/tests/auto/qgeoaddress/tst_qgeoaddress.cpp +++ b/tests/auto/qgeoaddress/tst_qgeoaddress.cpp @@ -97,8 +97,8 @@ void tst_QGeoAddress::textTest() { QGeoAddress address; QVERIFY(address.text().isEmpty()); - address.setText(QLatin1String("123 Fake Street\nSpringfield")); - QCOMPARE(address.text(), QLatin1String("123 Fake Street\nSpringfield")); + address.setText(QStringLiteral("123 Fake Street\nSpringfield")); + QCOMPARE(address.text(), QStringLiteral("123 Fake Street\nSpringfield")); } void tst_QGeoAddress::cityTest() @@ -201,7 +201,7 @@ void tst_QGeoAddress::generatedText() streetOnly.setStreet("street"); streetOnly.setCountryCode(countryCode); - QCOMPARE(streetOnly.text(), QLatin1String("street")); + QCOMPARE(streetOnly.text(), QStringLiteral("street")); QGeoAddress cityOnly; cityOnly.setCity("city"); @@ -209,7 +209,7 @@ void tst_QGeoAddress::generatedText() if (countryCode == QLatin1String("CYM") || countryCode == QLatin1String("IRL")) QCOMPARE(cityOnly.text(), QString()); else - QCOMPARE(cityOnly.text(), QLatin1String("city")); + QCOMPARE(cityOnly.text(), QStringLiteral("city")); QGeoAddress postalCodeOnly; postalCodeOnly.setPostalCode("postcode"); @@ -528,39 +528,39 @@ void tst_QGeoAddress::emptyClearTest() QGeoAddress testObj; QVERIFY(testObj.isEmpty()); - testObj.setCountry(QLatin1String("country")); + testObj.setCountry(QStringLiteral("country")); QVERIFY(!testObj.isEmpty()); testObj.clear(); - testObj.setCountryCode(QLatin1String("countryCode")); + testObj.setCountryCode(QStringLiteral("countryCode")); QVERIFY(!testObj.isEmpty()); testObj.clear(); - testObj.setState(QLatin1String("state")); + testObj.setState(QStringLiteral("state")); QVERIFY(!testObj.isEmpty()); testObj.clear(); - testObj.setCounty(QLatin1String("county")); + testObj.setCounty(QStringLiteral("county")); QVERIFY(!testObj.isEmpty()); testObj.clear(); - testObj.setCity(QLatin1String("city")); + testObj.setCity(QStringLiteral("city")); QVERIFY(!testObj.isEmpty()); testObj.clear(); - testObj.setDistrict(QLatin1String("district")); + testObj.setDistrict(QStringLiteral("district")); QVERIFY(!testObj.isEmpty()); testObj.clear(); - testObj.setPostalCode(QLatin1String("postalCode")); + testObj.setPostalCode(QStringLiteral("postalCode")); QVERIFY(!testObj.isEmpty()); testObj.clear(); - testObj.setStreet(QLatin1String("street")); + testObj.setStreet(QStringLiteral("street")); QVERIFY(!testObj.isEmpty()); testObj.clear(); - testObj.setText(QLatin1String("formatted address")); + testObj.setText(QStringLiteral("formatted address")); QVERIFY(!testObj.isEmpty()); testObj.clear(); diff --git a/tests/auto/qgeocameratiles/tst_qgeocameratiles.cpp b/tests/auto/qgeocameratiles/tst_qgeocameratiles.cpp index 2aa55f49..1daaae05 100644 --- a/tests/auto/qgeocameratiles/tst_qgeocameratiles.cpp +++ b/tests/auto/qgeocameratiles/tst_qgeocameratiles.cpp @@ -80,15 +80,15 @@ private: double step = 1 / (pow(2.0, 4.0) * 4); QString row = pti.xyString; - row += QLatin1String(" - "); + row += QStringLiteral(" - "); row += pti.zoomString; - row += QLatin1String(" - ("); + row += QStringLiteral(" - ("); row += QString::number(xOffset); - row += QLatin1String(","); + row += QStringLiteral(","); row += QString::number(yOffset); - row += QLatin1String(") - "); + row += QStringLiteral(") - "); row += pti.wString; - row += QLatin1String(" x "); + row += QStringLiteral(" x "); row += pti.hString; QList<int> xRow; @@ -362,8 +362,8 @@ private slots: pti.w = t - 1; pti.h = t - 1; - pti.wString = QLatin1String("(1T - 1)"); - pti.hString = QLatin1String("(1T - 1)"); + pti.wString = QStringLiteral("(1T - 1)"); + pti.hString = QStringLiteral("(1T - 1)"); /* @@ -522,70 +522,70 @@ private slots: right_tm1w << 2; pti.zoom = 4.0; - pti.zoomString = QLatin1String("int zoom"); + pti.zoomString = QStringLiteral("int zoom"); pti.x = 0.5; pti.y = 0.5; - pti.xyString = QLatin1String("middle"); + pti.xyString = QStringLiteral("middle"); test_group(pti, mid_tm1x, mid_tm1w, mid_tm1x, mid_tm1w); pti.x = 0.5; pti.y = 0.0; - pti.xyString = QLatin1String("top"); + pti.xyString = QStringLiteral("top"); test_group(pti, mid_tm1x, mid_tm1w, top_tm1x, top_tm1w); pti.x = 0.5; pti.y = 15.0 / 16.0; - pti.xyString = QLatin1String("bottom"); + pti.xyString = QStringLiteral("bottom"); test_group(pti, mid_tm1x, mid_tm1w, bottom_tm1x, bottom_tm1w); pti.x = 0.0; pti.y = 0.5; - pti.xyString = QLatin1String("left"); + pti.xyString = QStringLiteral("left"); test_group(pti, left_tm1x, left_tm1w, mid_tm1x, mid_tm1w); pti.x = 15.0 / 16.0; pti.y = 0.5; - pti.xyString = QLatin1String("right"); + pti.xyString = QStringLiteral("right"); test_group(pti, right_tm1x, right_tm1w, mid_tm1x, mid_tm1w); pti.zoom = 4.5; - pti.zoomString = QLatin1String("frac zoom"); + pti.zoomString = QStringLiteral("frac zoom"); pti.w = pti.w * pow(2.0, 0.5); pti.h = pti.h * pow(2.0, 0.5); pti.x = 0.5; pti.y = 0.5; - pti.xyString = QLatin1String("middle"); + pti.xyString = QStringLiteral("middle"); test_group(pti, mid_tm1x, mid_tm1w, mid_tm1x, mid_tm1w); pti.x = 0.5; pti.y = 0.0; - pti.xyString = QLatin1String("top"); + pti.xyString = QStringLiteral("top"); test_group(pti, mid_tm1x, mid_tm1w, top_tm1x, top_tm1w); pti.x = 0.5; pti.y = 15.0 / 16.0; - pti.xyString = QLatin1String("bottom"); + pti.xyString = QStringLiteral("bottom"); test_group(pti, mid_tm1x, mid_tm1w, bottom_tm1x, bottom_tm1w); pti.x = 0.0; pti.y = 0.5; - pti.xyString = QLatin1String("left"); + pti.xyString = QStringLiteral("left"); test_group(pti, left_tm1x, left_tm1w, mid_tm1x, mid_tm1w); pti.x = 15.0 / 16.0; pti.y = 0.5; - pti.xyString = QLatin1String("right"); + pti.xyString = QStringLiteral("right"); test_group(pti, right_tm1x, right_tm1w, mid_tm1x, mid_tm1w); @@ -606,8 +606,8 @@ private slots: pti.w = t; pti.h = t; - pti.wString = QLatin1String("1T"); - pti.hString = QLatin1String("1T"); + pti.wString = QStringLiteral("1T"); + pti.hString = QStringLiteral("1T"); /* @@ -766,70 +766,70 @@ private slots: right_tw << 2; pti.zoom = 4.0; - pti.zoomString = QLatin1String("int zoom"); + pti.zoomString = QStringLiteral("int zoom"); pti.x = 0.5; pti.y = 0.5; - pti.xyString = QLatin1String("middle"); + pti.xyString = QStringLiteral("middle"); test_group(pti, mid_tx, mid_tw, mid_tx, mid_tw); pti.x = 0.5; pti.y = 0.0; - pti.xyString = QLatin1String("top"); + pti.xyString = QStringLiteral("top"); test_group(pti, mid_tx, mid_tw, top_tx, top_tw); pti.x = 0.5; pti.y = 15.0 / 16.0; - pti.xyString = QLatin1String("bottom"); + pti.xyString = QStringLiteral("bottom"); test_group(pti, mid_tx, mid_tw, bottom_tx, bottom_tw); pti.x = 0.0; pti.y = 0.5; - pti.xyString = QLatin1String("left"); + pti.xyString = QStringLiteral("left"); test_group(pti, left_tx, left_tw, mid_tx, mid_tw); pti.x = 15.0 / 16.0; pti.y = 0.5; - pti.xyString = QLatin1String("right"); + pti.xyString = QStringLiteral("right"); test_group(pti, right_tx, right_tw, mid_tx, mid_tw); pti.zoom = 4.5; - pti.zoomString = QLatin1String("frac zoom"); + pti.zoomString = QStringLiteral("frac zoom"); pti.w = pti.w * pow(2.0, 0.5); pti.h = pti.h * pow(2.0, 0.5); pti.x = 0.5; pti.y = 0.5; - pti.xyString = QLatin1String("middle"); + pti.xyString = QStringLiteral("middle"); test_group(pti, mid_tx, mid_tw, mid_tx, mid_tw); pti.x = 0.5; pti.y = 0.0; - pti.xyString = QLatin1String("top"); + pti.xyString = QStringLiteral("top"); test_group(pti, mid_tx, mid_tw, top_tx, top_tw); pti.x = 0.5; pti.y = 15.0 / 16.0; - pti.xyString = QLatin1String("bottom"); + pti.xyString = QStringLiteral("bottom"); test_group(pti, mid_tx, mid_tw, bottom_tx, bottom_tw); pti.x = 0.0; pti.y = 0.5; - pti.xyString = QLatin1String("left"); + pti.xyString = QStringLiteral("left"); test_group(pti, left_tx, left_tw, mid_tx, mid_tw); pti.x = 15.0 / 16.0; pti.y = 0.5; - pti.xyString = QLatin1String("right"); + pti.xyString = QStringLiteral("right"); test_group(pti, right_tx, right_tw, mid_tx, mid_tw); @@ -850,8 +850,8 @@ private slots: pti.w = t + 1; pti.h = t + 1; - pti.wString = QLatin1String("(1T + 1)"); - pti.hString = QLatin1String("(1T + 1)"); + pti.wString = QStringLiteral("(1T + 1)"); + pti.hString = QStringLiteral("(1T + 1)"); /* @@ -1010,70 +1010,70 @@ private slots: right_tp1w << 2; pti.zoom = 4.0; - pti.zoomString = QLatin1String("int zoom"); + pti.zoomString = QStringLiteral("int zoom"); pti.x = 0.5; pti.y = 0.5; - pti.xyString = QLatin1String("middle"); + pti.xyString = QStringLiteral("middle"); test_group(pti, mid_tp1x, mid_tp1w, mid_tp1x, mid_tp1w); pti.x = 0.5; pti.y = 0.0; - pti.xyString = QLatin1String("top"); + pti.xyString = QStringLiteral("top"); test_group(pti, mid_tp1x, mid_tp1w, top_tp1x, top_tp1w); pti.x = 0.5; pti.y = 15.0 / 16.0; - pti.xyString = QLatin1String("bottom"); + pti.xyString = QStringLiteral("bottom"); test_group(pti, mid_tp1x, mid_tp1w, bottom_tp1x, bottom_tp1w); pti.x = 0.0; pti.y = 0.5; - pti.xyString = QLatin1String("left"); + pti.xyString = QStringLiteral("left"); test_group(pti, left_tp1x, left_tp1w, mid_tp1x, mid_tp1w); pti.x = 15.0 / 16.0; pti.y = 0.5; - pti.xyString = QLatin1String("right"); + pti.xyString = QStringLiteral("right"); test_group(pti, right_tp1x, right_tp1w, mid_tp1x, mid_tp1w); pti.zoom = 4.5; - pti.zoomString = QLatin1String("frac zoom"); + pti.zoomString = QStringLiteral("frac zoom"); pti.w = pti.w * pow(2.0, 0.5); pti.h = pti.h * pow(2.0, 0.5); pti.x = 0.5; pti.y = 0.5; - pti.xyString = QLatin1String("middle"); + pti.xyString = QStringLiteral("middle"); test_group(pti, mid_tp1x, mid_tp1w, mid_tp1x, mid_tp1w); pti.x = 0.5; pti.y = 0.0; - pti.xyString = QLatin1String("top"); + pti.xyString = QStringLiteral("top"); test_group(pti, mid_tp1x, mid_tp1w, top_tp1x, top_tp1w); pti.x = 0.5; pti.y = 15.0 / 16.0; - pti.xyString = QLatin1String("bottom"); + pti.xyString = QStringLiteral("bottom"); test_group(pti, mid_tp1x, mid_tp1w, bottom_tp1x, bottom_tp1w); pti.x = 0.0; pti.y = 0.5; - pti.xyString = QLatin1String("left"); + pti.xyString = QStringLiteral("left"); test_group(pti, left_tp1x, left_tp1w, mid_tp1x, mid_tp1w); pti.x = 15.0 / 16.0; pti.y = 0.5; - pti.xyString = QLatin1String("right"); + pti.xyString = QStringLiteral("right"); test_group(pti, right_tp1x, right_tp1w, mid_tp1x, mid_tp1w); @@ -1094,8 +1094,8 @@ private slots: pti.w = 2 * t - 1; pti.h = 2 * t - 1; - pti.wString = QLatin1String("(2T - 1)"); - pti.hString = QLatin1String("(2T - 1)"); + pti.wString = QStringLiteral("(2T - 1)"); + pti.hString = QStringLiteral("(2T - 1)"); /* offset = 0 @@ -1253,70 +1253,70 @@ private slots: right_t2m1w << 2; pti.zoom = 4.0; - pti.zoomString = QLatin1String("int zoom"); + pti.zoomString = QStringLiteral("int zoom"); pti.x = 0.5; pti.y = 0.5; - pti.xyString = QLatin1String("middle"); + pti.xyString = QStringLiteral("middle"); test_group(pti, mid_t2m1x, mid_t2m1w, mid_t2m1x, mid_t2m1w); pti.x = 0.5; pti.y = 0.0; - pti.xyString = QLatin1String("top"); + pti.xyString = QStringLiteral("top"); test_group(pti, mid_t2m1x, mid_t2m1w, top_t2m1x, top_t2m1w); pti.x = 0.5; pti.y = 15.0 / 16.0; - pti.xyString = QLatin1String("bottom"); + pti.xyString = QStringLiteral("bottom"); test_group(pti, mid_t2m1x, mid_t2m1w, bottom_t2m1x, bottom_t2m1w); pti.x = 0.0; pti.y = 0.5; - pti.xyString = QLatin1String("left"); + pti.xyString = QStringLiteral("left"); test_group(pti, left_t2m1x, left_t2m1w, mid_t2m1x, mid_t2m1w); pti.x = 15.0 / 16.0; pti.y = 0.5; - pti.xyString = QLatin1String("right"); + pti.xyString = QStringLiteral("right"); test_group(pti, right_t2m1x, right_t2m1w, mid_t2m1x, mid_t2m1w); pti.zoom = 4.5; - pti.zoomString = QLatin1String("frac zoom"); + pti.zoomString = QStringLiteral("frac zoom"); pti.w = pti.w * pow(2.0, 0.5); pti.h = pti.h * pow(2.0, 0.5); pti.x = 0.5; pti.y = 0.5; - pti.xyString = QLatin1String("middle"); + pti.xyString = QStringLiteral("middle"); test_group(pti, mid_t2m1x, mid_t2m1w, mid_t2m1x, mid_t2m1w); pti.x = 0.5; pti.y = 0.0; - pti.xyString = QLatin1String("top"); + pti.xyString = QStringLiteral("top"); test_group(pti, mid_t2m1x, mid_t2m1w, top_t2m1x, top_t2m1w); pti.x = 0.5; pti.y = 15.0 / 16.0; - pti.xyString = QLatin1String("bottom"); + pti.xyString = QStringLiteral("bottom"); test_group(pti, mid_t2m1x, mid_t2m1w, bottom_t2m1x, bottom_t2m1w); pti.x = 0.0; pti.y = 0.5; - pti.xyString = QLatin1String("left"); + pti.xyString = QStringLiteral("left"); test_group(pti, left_t2m1x, left_t2m1w, mid_t2m1x, mid_t2m1w); pti.x = 15.0 / 16.0; pti.y = 0.5; - pti.xyString = QLatin1String("right"); + pti.xyString = QStringLiteral("right"); test_group(pti, right_t2m1x, right_t2m1w, mid_t2m1x, mid_t2m1w); @@ -1338,8 +1338,8 @@ private slots: pti.w = 2 * t; pti.h = 2 * t; - pti.wString = QLatin1String("2T"); - pti.hString = QLatin1String("2T"); + pti.wString = QStringLiteral("2T"); + pti.hString = QStringLiteral("2T"); /* @@ -1498,70 +1498,70 @@ private slots: right_t2w << 4; pti.zoom = 4.0; - pti.zoomString = QLatin1String("int zoom"); + pti.zoomString = QStringLiteral("int zoom"); pti.x = 0.5; pti.y = 0.5; - pti.xyString = QLatin1String("middle"); + pti.xyString = QStringLiteral("middle"); test_group(pti, mid_t2x, mid_t2w, mid_t2x, mid_t2w); pti.x = 0.5; pti.y = 0.0; - pti.xyString = QLatin1String("top"); + pti.xyString = QStringLiteral("top"); test_group(pti, mid_t2x, mid_t2w, top_t2x, top_t2w); pti.x = 0.5; pti.y = 15.0 / 16.0; - pti.xyString = QLatin1String("bottom"); + pti.xyString = QStringLiteral("bottom"); test_group(pti, mid_t2x, mid_t2w, bottom_t2x, bottom_t2w); pti.x = 0.0; pti.y = 0.5; - pti.xyString = QLatin1String("left"); + pti.xyString = QStringLiteral("left"); test_group(pti, left_t2x, left_t2w, mid_t2x, mid_t2w); pti.x = 15.0 / 16.0; pti.y = 0.5; - pti.xyString = QLatin1String("right"); + pti.xyString = QStringLiteral("right"); test_group(pti, right_t2x, right_t2w, mid_t2x, mid_t2w); pti.zoom = 4.5; - pti.zoomString = QLatin1String("frac zoom"); + pti.zoomString = QStringLiteral("frac zoom"); pti.w = pti.w * pow(2.0, 0.5); pti.h = pti.h * pow(2.0, 0.5); pti.x = 0.5; pti.y = 0.5; - pti.xyString = QLatin1String("middle"); + pti.xyString = QStringLiteral("middle"); test_group(pti, mid_t2x, mid_t2w, mid_t2x, mid_t2w); pti.x = 0.5; pti.y = 0.0; - pti.xyString = QLatin1String("top"); + pti.xyString = QStringLiteral("top"); test_group(pti, mid_t2x, mid_t2w, top_t2x, top_t2w); pti.x = 0.5; pti.y = 15.0 / 16.0; - pti.xyString = QLatin1String("bottom"); + pti.xyString = QStringLiteral("bottom"); test_group(pti, mid_t2x, mid_t2w, bottom_t2x, bottom_t2w); pti.x = 0.0; pti.y = 0.5; - pti.xyString = QLatin1String("left"); + pti.xyString = QStringLiteral("left"); test_group(pti, left_t2x, left_t2w, mid_t2x, mid_t2w); pti.x = 15.0 / 16.0; pti.y = 0.5; - pti.xyString = QLatin1String("right"); + pti.xyString = QStringLiteral("right"); test_group(pti, right_t2x, right_t2w, mid_t2x, mid_t2w); @@ -1582,8 +1582,8 @@ private slots: pti.w = 2 * t + 1; pti.h = 2 * t + 1; - pti.wString = QLatin1String("(2T + 1)"); - pti.hString = QLatin1String("(2T + 1)"); + pti.wString = QStringLiteral("(2T + 1)"); + pti.hString = QStringLiteral("(2T + 1)"); /* @@ -1742,70 +1742,70 @@ private slots: right_t2p1w << 4; pti.zoom = 4.0; - pti.zoomString = QLatin1String("int zoom"); + pti.zoomString = QStringLiteral("int zoom"); pti.x = 0.5; pti.y = 0.5; - pti.xyString = QLatin1String("middle"); + pti.xyString = QStringLiteral("middle"); test_group(pti, mid_t2p1x, mid_t2p1w, mid_t2p1x, mid_t2p1w); pti.x = 0.5; pti.y = 0.0; - pti.xyString = QLatin1String("top"); + pti.xyString = QStringLiteral("top"); test_group(pti, mid_t2p1x, mid_t2p1w, top_t2p1x, top_t2p1w); pti.x = 0.5; pti.y = 15.0 / 16.0; - pti.xyString = QLatin1String("bottom"); + pti.xyString = QStringLiteral("bottom"); test_group(pti, mid_t2p1x, mid_t2p1w, bottom_t2p1x, bottom_t2p1w); pti.x = 0.0; pti.y = 0.5; - pti.xyString = QLatin1String("left"); + pti.xyString = QStringLiteral("left"); test_group(pti, left_t2p1x, left_t2p1w, mid_t2p1x, mid_t2p1w); pti.x = 15.0 / 16.0; pti.y = 0.5; - pti.xyString = QLatin1String("right"); + pti.xyString = QStringLiteral("right"); test_group(pti, right_t2p1x, right_t2p1w, mid_t2p1x, mid_t2p1w); pti.zoom = 4.5; - pti.zoomString = QLatin1String("frac zoom"); + pti.zoomString = QStringLiteral("frac zoom"); pti.w = pti.w * pow(2.0, 0.5); pti.h = pti.h * pow(2.0, 0.5); pti.x = 0.5; pti.y = 0.5; - pti.xyString = QLatin1String("middle"); + pti.xyString = QStringLiteral("middle"); test_group(pti, mid_t2p1x, mid_t2p1w, mid_t2p1x, mid_t2p1w); pti.x = 0.5; pti.y = 0.0; - pti.xyString = QLatin1String("top"); + pti.xyString = QStringLiteral("top"); test_group(pti, mid_t2p1x, mid_t2p1w, top_t2p1x, top_t2p1w); pti.x = 0.5; pti.y = 15.0 / 16.0; - pti.xyString = QLatin1String("bottom"); + pti.xyString = QStringLiteral("bottom"); test_group(pti, mid_t2p1x, mid_t2p1w, bottom_t2p1x, bottom_t2p1w); pti.x = 0.0; pti.y = 0.5; - pti.xyString = QLatin1String("left"); + pti.xyString = QStringLiteral("left"); test_group(pti, left_t2p1x, left_t2p1w, mid_t2p1x, mid_t2p1w); pti.x = 15.0 / 16.0; pti.y = 0.5; - pti.xyString = QLatin1String("right"); + pti.xyString = QStringLiteral("right"); test_group(pti, right_t2p1x, right_t2p1w, mid_t2p1x, mid_t2p1w); } diff --git a/tests/auto/qgeolocation/tst_qgeolocation.cpp b/tests/auto/qgeolocation/tst_qgeolocation.cpp index c9e14d66..68a1d970 100644 --- a/tests/auto/qgeolocation/tst_qgeolocation.cpp +++ b/tests/auto/qgeolocation/tst_qgeolocation.cpp @@ -227,7 +227,7 @@ void tst_QGeoLocation::comparison_data() void tst_QGeoLocation::isEmpty() { QGeoAddress address; - address.setCity(QLatin1String("Braunschweig")); + address.setCity(QStringLiteral("Braunschweig")); QVERIFY(!address.isEmpty()); QGeoRectangle boundingBox; diff --git a/tests/auto/qgeoroutexmlparser/tst_qgeoroutexmlparser.cpp b/tests/auto/qgeoroutexmlparser/tst_qgeoroutexmlparser.cpp index 1dde8b33..14411720 100644 --- a/tests/auto/qgeoroutexmlparser/tst_qgeoroutexmlparser.cpp +++ b/tests/auto/qgeoroutexmlparser/tst_qgeoroutexmlparser.cpp @@ -105,7 +105,7 @@ private slots: // check the first maneuver is correct QGeoManeuver first = segments.at(0).maneuver(); - QCOMPARE(first.instructionText(), QLatin1String("Head toward Logan Rd (95) on Padstow Rd (56). Go for 0.3 miles.")); + QCOMPARE(first.instructionText(), QStringLiteral("Head toward Logan Rd (95) on Padstow Rd (56). Go for 0.3 miles.")); QCOMPARE(first.position(), QGeoCoordinate(-27.5752144, 153.0879669)); QCOMPARE(first.timeToNextInstruction(), 24); diff --git a/tests/auto/qmlinterface/tst_qmlinterface.cpp b/tests/auto/qmlinterface/tst_qmlinterface.cpp index 1919a817..44edc79a 100644 --- a/tests/auto/qmlinterface/tst_qmlinterface.cpp +++ b/tests/auto/qmlinterface/tst_qmlinterface.cpp @@ -98,12 +98,12 @@ tst_qmlinterface::tst_qmlinterface() m_coordinate.setLatitude(20.0); m_coordinate.setAltitude(30.0); - m_address.setCity(QLatin1String("Brisbane")); - m_address.setCountry(QLatin1String("Australia")); - m_address.setCountryCode(QLatin1String("AU")); - m_address.setPostalCode(QLatin1String("4000")); - m_address.setState(QLatin1String("Queensland")); - m_address.setStreet(QLatin1String("123 Fake Street")); + m_address.setCity(QStringLiteral("Brisbane")); + m_address.setCountry(QStringLiteral("Australia")); + m_address.setCountryCode(QStringLiteral("AU")); + m_address.setPostalCode(QStringLiteral("4000")); + m_address.setState(QStringLiteral("Queensland")); + m_address.setStreet(QStringLiteral("123 Fake Street")); m_rectangle.setCenter(m_coordinate); m_rectangle.setHeight(30.0); @@ -113,42 +113,42 @@ tst_qmlinterface::tst_qmlinterface() m_location.setBoundingBox(m_rectangle); m_location.setCoordinate(m_coordinate); - m_category.setName(QLatin1String("Test category")); - m_category.setCategoryId(QLatin1String("test-category-id")); + m_category.setName(QStringLiteral("Test category")); + m_category.setCategoryId(QStringLiteral("test-category-id")); QVariantMap iconParams; - iconParams.insert(QPlaceIcon::SingleUrl, QUrl(QLatin1String("http://www.example.com/test-icon.png"))); + iconParams.insert(QPlaceIcon::SingleUrl, QUrl(QStringLiteral("http://www.example.com/test-icon.png"))); m_icon.setParameters(iconParams); m_ratings.setAverage(3.5); m_ratings.setMaximum(5.0); m_ratings.setCount(10); - m_supplier.setName(QLatin1String("Test supplier")); - m_supplier.setUrl(QUrl(QLatin1String("http://www.example.com/test-supplier"))); - m_supplier.setSupplierId(QLatin1String("test-supplier-id")); + m_supplier.setName(QStringLiteral("Test supplier")); + m_supplier.setUrl(QUrl(QStringLiteral("http://www.example.com/test-supplier"))); + m_supplier.setSupplierId(QStringLiteral("test-supplier-id")); m_supplier.setIcon(m_icon); - m_user.setName(QLatin1String("Test User")); - m_user.setUserId(QLatin1String("test-user-id")); + m_user.setName(QStringLiteral("Test User")); + m_user.setUserId(QStringLiteral("test-user-id")); - m_placeAttribute.setLabel(QLatin1String("Test Attribute")); - m_placeAttribute.setText(QLatin1String("Test attribute text")); + m_placeAttribute.setLabel(QStringLiteral("Test Attribute")); + m_placeAttribute.setText(QStringLiteral("Test attribute text")); - m_contactDetail.setLabel(QLatin1String("Test Contact Detail")); - m_contactDetail.setValue(QLatin1String("Test contact detail value")); + m_contactDetail.setLabel(QStringLiteral("Test Contact Detail")); + m_contactDetail.setValue(QStringLiteral("Test contact detail value")); QPlaceCategory category; - category.setName(QLatin1String("Test category 1")); - category.setCategoryId(QLatin1String("test-category-id-1")); + category.setName(QStringLiteral("Test category 1")); + category.setCategoryId(QStringLiteral("test-category-id-1")); m_categories.append(category); - category.setName(QLatin1String("Test category 2")); - category.setCategoryId(QLatin1String("test-category-id-2")); + category.setName(QStringLiteral("Test category 2")); + category.setCategoryId(QStringLiteral("test-category-id-2")); m_categories.append(category); - m_place.setName(QLatin1String("Test Place")); - m_place.setPlaceId(QLatin1String("test-place-id")); - m_place.setAttribution(QLatin1String("Place data by Foo")); + m_place.setName(QStringLiteral("Test Place")); + m_place.setPlaceId(QStringLiteral("test-place-id")); + m_place.setAttribution(QStringLiteral("Place data by Foo")); m_place.setCategories(m_categories); m_place.setLocation(m_location); m_place.setRatings(m_ratings); diff --git a/tests/auto/qplace/tst_qplace.cpp b/tests/auto/qplace/tst_qplace.cpp index 1b5ea786..ce832441 100644 --- a/tests/auto/qplace/tst_qplace.cpp +++ b/tests/auto/qplace/tst_qplace.cpp @@ -93,7 +93,7 @@ void tst_Place::constructorTest() QPlaceAttribute paymentMethods; paymentMethods.setLabel("Payment methods"); paymentMethods.setText("Visa"); - testObj.setExtendedAttribute(QLatin1String("paymentMethods"), paymentMethods); + testObj.setExtendedAttribute(QStringLiteral("paymentMethods"), paymentMethods); QGeoLocation loc; loc.setCoordinate(QGeoCoordinate(10,20)); testObj.setLocation(loc); @@ -227,13 +227,13 @@ void tst_Place::reviewContentTest() QVERIFY2(place.content(QPlaceContent::ReviewType).count() ==0,"Wrong default value"); QPlaceReview dummyReview; - dummyReview.setTitle(QLatin1String("Review 1")); + dummyReview.setTitle(QStringLiteral("Review 1")); QPlaceReview dummyReview2; - dummyReview2.setTitle(QLatin1String("Review 2")); + dummyReview2.setTitle(QStringLiteral("Review 2")); QPlaceReview dummyReview3; - dummyReview3.setTitle(QLatin1String("Review 3")); + dummyReview3.setTitle(QStringLiteral("Review 3")); QPlaceContent::Collection reviewCollection; reviewCollection.insert(0,dummyReview); @@ -251,10 +251,10 @@ void tst_Place::reviewContentTest() //replace the second and insert a sixth review //indexes 4 and 5 are "missing" QPlaceReview dummyReview2New; - dummyReview2.setTitle(QLatin1String("Review 2 new")); + dummyReview2.setTitle(QStringLiteral("Review 2 new")); QPlaceReview dummyReview6; - dummyReview6.setTitle(QLatin1String("Review 6")); + dummyReview6.setTitle(QStringLiteral("Review 6")); reviewCollection.clear(); reviewCollection.insert(1, dummyReview2New); @@ -277,13 +277,13 @@ void tst_Place::editorialContentTest() QVERIFY2(place.content(QPlaceContent::EditorialType).count() == 0, "Wrong default value"); QPlaceEditorial dummyEditorial; - dummyEditorial.setTitle(QLatin1String("Editorial 1")); + dummyEditorial.setTitle(QStringLiteral("Editorial 1")); QPlaceEditorial dummyEditorial2; - dummyEditorial2.setTitle(QLatin1String("Editorial 2")); + dummyEditorial2.setTitle(QStringLiteral("Editorial 2")); QPlaceEditorial dummyEditorial3; - dummyEditorial3.setTitle(QLatin1String("Editorial 3")); + dummyEditorial3.setTitle(QStringLiteral("Editorial 3")); QPlaceContent::Collection editorialCollection; editorialCollection.insert(0,dummyEditorial); @@ -301,10 +301,10 @@ void tst_Place::editorialContentTest() //replace the second and insert a sixth editorial //indexes 4 and 5 are "missing" QPlaceEditorial dummyEditorial2New; - dummyEditorial2.setTitle(QLatin1String("Editorial 2 new")); + dummyEditorial2.setTitle(QStringLiteral("Editorial 2 new")); QPlaceEditorial dummyEditorial6; - dummyEditorial6.setTitle(QLatin1String("Editorial 6")); + dummyEditorial6.setTitle(QStringLiteral("Editorial 6")); editorialCollection.clear(); editorialCollection.insert(1, dummyEditorial2New); @@ -377,8 +377,8 @@ void tst_Place::attributionTest() { QPlace testPlace; QVERIFY(testPlace.attribution().isEmpty()); - testPlace.setAttribution(QLatin1String("attribution")); - QCOMPARE(testPlace.attribution(), QLatin1String("attribution")); + testPlace.setAttribution(QStringLiteral("attribution")); + QCOMPARE(testPlace.attribution(), QStringLiteral("attribution")); testPlace.setAttribution(QString()); QVERIFY(testPlace.attribution().isEmpty()); } @@ -434,8 +434,8 @@ void tst_Place::primaryPhoneTest() QVERIFY2(place.primaryPhone().isEmpty(), "Wrong default value"); QPlaceContactDetail contactDetail; - contactDetail.setLabel(QLatin1String("Phone")); - contactDetail.setValue(QLatin1String("555-5555")); + contactDetail.setLabel(QStringLiteral("Phone")); + contactDetail.setValue(QStringLiteral("555-5555")); place.appendContactDetail(QPlaceContactDetail::Phone, contactDetail); QCOMPARE(place.primaryPhone(), QString("555-5555")); @@ -451,11 +451,11 @@ void tst_Place::primaryEmailTest() QVERIFY2(place.primaryEmail().isEmpty(), "Wrong default value"); QPlaceContactDetail contactDetail; - contactDetail.setLabel(QLatin1String("Email")); - contactDetail.setValue(QLatin1String("test@test.com")); + contactDetail.setLabel(QStringLiteral("Email")); + contactDetail.setValue(QStringLiteral("test@test.com")); place.appendContactDetail(QPlaceContactDetail::Email, contactDetail); - QCOMPARE(place.primaryEmail(), QLatin1String("test@test.com")); + QCOMPARE(place.primaryEmail(), QStringLiteral("test@test.com")); //try clearing the primary email address place.setContactDetails(QPlaceContactDetail::Email, QList<QPlaceContactDetail>()); @@ -468,11 +468,11 @@ void tst_Place::primaryFaxTest() QVERIFY2(place.primaryFax().isEmpty(), "Wrong default value"); QPlaceContactDetail contactDetail; - contactDetail.setLabel(QLatin1String("Fax")); - contactDetail.setValue(QLatin1String("555-5555")); + contactDetail.setLabel(QStringLiteral("Fax")); + contactDetail.setValue(QStringLiteral("555-5555")); place.appendContactDetail(QPlaceContactDetail::Fax, contactDetail); - QCOMPARE(place.primaryFax(), QLatin1String("555-5555")); + QCOMPARE(place.primaryFax(), QStringLiteral("555-5555")); //try clearing the primary fax number place.setContactDetails(QPlaceContactDetail::Fax, QList<QPlaceContactDetail>()); @@ -485,8 +485,8 @@ void tst_Place::primaryWebsiteTest() QVERIFY2(place.primaryWebsite().isEmpty(), "Wrong default value"); QPlaceContactDetail contactDetail; - contactDetail.setLabel(QLatin1String("Website")); - contactDetail.setValue(QLatin1String("www.example.com")); + contactDetail.setLabel(QStringLiteral("Website")); + contactDetail.setValue(QStringLiteral("www.example.com")); place.appendContactDetail(QPlaceContactDetail::Website, contactDetail); QCOMPARE(place.primaryWebsite(), QUrl("www.example.com")); @@ -503,7 +503,7 @@ void tst_Place::operatorsTest() QPlaceAttribute paymentMethods; paymentMethods.setLabel("Payment methods"); paymentMethods.setText("Visa"); - testObj.setExtendedAttribute(QLatin1String("paymentMethods"), paymentMethods); + testObj.setExtendedAttribute(QStringLiteral("paymentMethods"), paymentMethods); QGeoLocation loc; loc.setCoordinate(QGeoCoordinate(10,20)); testObj.setLocation(loc); @@ -520,38 +520,38 @@ void tst_Place::extendedAttributeTest() QPlace place; QVERIFY(place.extendedAttributeTypes().isEmpty()); QPlaceAttribute smoking; - smoking.setLabel(QLatin1String("Public Smoking")); - smoking.setText(QLatin1String("No")); + smoking.setLabel(QStringLiteral("Public Smoking")); + smoking.setText(QStringLiteral("No")); //test setting of an attribue - place.setExtendedAttribute(QLatin1String("smoking"), smoking); + place.setExtendedAttribute(QStringLiteral("smoking"), smoking); - QVERIFY(place.extendedAttributeTypes().contains(QLatin1String("smoking"))); + QVERIFY(place.extendedAttributeTypes().contains(QStringLiteral("smoking"))); QCOMPARE(place.extendedAttributeTypes().count(), 1); - QCOMPARE(place.extendedAttribute(QLatin1String("smoking")).label(), QLatin1String("Public Smoking")); - QCOMPARE(place.extendedAttribute(QLatin1String("smoking")).text(), QLatin1String("No")); + QCOMPARE(place.extendedAttribute(QStringLiteral("smoking")).label(), QStringLiteral("Public Smoking")); + QCOMPARE(place.extendedAttribute(QStringLiteral("smoking")).text(), QStringLiteral("No")); QPlaceAttribute shelter; - shelter.setLabel(QLatin1String("Outdoor shelter")); - shelter.setText(QLatin1String("Yes")); + shelter.setLabel(QStringLiteral("Outdoor shelter")); + shelter.setText(QStringLiteral("Yes")); //test setting another new attribute place.setExtendedAttribute("shelter", shelter); - QVERIFY(place.extendedAttributeTypes().contains(QLatin1String("shelter"))); - QVERIFY(place.extendedAttributeTypes().contains(QLatin1String("smoking"))); + QVERIFY(place.extendedAttributeTypes().contains(QStringLiteral("shelter"))); + QVERIFY(place.extendedAttributeTypes().contains(QStringLiteral("smoking"))); QCOMPARE(place.extendedAttributeTypes().count(), 2); - QCOMPARE(place.extendedAttribute(QLatin1String("shelter")).label(), QLatin1String("Outdoor shelter")); - QCOMPARE(place.extendedAttribute(QLatin1String("shelter")).text(), QLatin1String("Yes")); + QCOMPARE(place.extendedAttribute(QStringLiteral("shelter")).label(), QStringLiteral("Outdoor shelter")); + QCOMPARE(place.extendedAttribute(QStringLiteral("shelter")).text(), QStringLiteral("Yes")); //test overwriting an attribute - shelter.setText(QLatin1String("No")); - place.setExtendedAttribute(QLatin1String("shelter"), shelter); + shelter.setText(QStringLiteral("No")); + place.setExtendedAttribute(QStringLiteral("shelter"), shelter); - QVERIFY(place.extendedAttributeTypes().contains(QLatin1String("shelter"))); - QVERIFY(place.extendedAttributeTypes().contains(QLatin1String("smoking"))); + QVERIFY(place.extendedAttributeTypes().contains(QStringLiteral("shelter"))); + QVERIFY(place.extendedAttributeTypes().contains(QStringLiteral("smoking"))); QCOMPARE(place.extendedAttributeTypes().count(), 2); - QCOMPARE(place.extendedAttribute(QLatin1String("shelter")).text(), QLatin1String("No")); + QCOMPARE(place.extendedAttribute(QStringLiteral("shelter")).text(), QStringLiteral("No")); //test clearing of attributes by setting them to the default attribute foreach (const QString &attributeType, place.extendedAttributeTypes()) @@ -560,9 +560,9 @@ void tst_Place::extendedAttributeTest() QCOMPARE(place.extendedAttributeTypes().count(), 0); //test removing of attributes - place.setExtendedAttribute(QLatin1String("smoking"), smoking); + place.setExtendedAttribute(QStringLiteral("smoking"), smoking); QVERIFY(!place.extendedAttributeTypes().isEmpty()); - place.removeExtendedAttribute(QLatin1String("smoking")); + place.removeExtendedAttribute(QStringLiteral("smoking")); QVERIFY(place.extendedAttributeTypes().isEmpty()); } void tst_Place::visibilityTest() @@ -589,12 +589,12 @@ void tst_Place::isEmptyTest() QVERIFY(!ratings.isEmpty()); QPlaceSupplier supplier; - supplier.setName(QLatin1String("Foo & Bar Imports")); + supplier.setName(QStringLiteral("Foo & Bar Imports")); QVERIFY(!supplier.isEmpty()); QPlaceIcon icon; QVariantMap iconParametersMap; - iconParametersMap.insert(QLatin1String("Para"), QLatin1String("meter")); + iconParametersMap.insert(QStringLiteral("Para"), QStringLiteral("meter")); icon.setParameters(iconParametersMap); QVERIFY(!icon.isEmpty()); @@ -603,7 +603,7 @@ void tst_Place::isEmptyTest() contentCollection.insert(42, content); QPlaceAttribute attribute; - attribute.setLabel(QLatin1String("noodle")); + attribute.setLabel(QStringLiteral("noodle")); QPlaceContactDetail contactDetail; @@ -638,7 +638,7 @@ void tst_Place::isEmptyTest() QVERIFY(place.isEmpty()); // attribution - place.setAttribution(QLatin1String("attr")); + place.setAttribution(QStringLiteral("attr")); QVERIFY(!place.isEmpty()); place.setAttribution(QString()); QVERIFY(place.isEmpty()); @@ -655,21 +655,21 @@ void tst_Place::isEmptyTest() place = QPlace(); // name - place.setName(QLatin1String("Naniwa")); + place.setName(QStringLiteral("Naniwa")); QVERIFY(!place.isEmpty()); place.setName(QString()); QVERIFY(place.isEmpty()); // placeId - place.setPlaceId(QLatin1String("naniwa")); + place.setPlaceId(QStringLiteral("naniwa")); QVERIFY(!place.isEmpty()); place.setPlaceId(QString()); QVERIFY(place.isEmpty()); // extendedAttributes - place.setExtendedAttribute(QLatin1String("part"), attribute); + place.setExtendedAttribute(QStringLiteral("part"), attribute); QVERIFY(!place.isEmpty()); - place.removeExtendedAttribute(QLatin1String("part")); + place.removeExtendedAttribute(QStringLiteral("part")); QVERIFY(place.isEmpty()); // extendedAttributes @@ -677,9 +677,9 @@ void tst_Place::isEmptyTest() QVERIFY(place.isEmpty()); // contact detail - place.appendContactDetail(QLatin1String("phone"), contactDetail); + place.appendContactDetail(QStringLiteral("phone"), contactDetail); QVERIFY(!place.isEmpty()); - place.removeContactDetails(QLatin1String("phone")); + place.removeContactDetails(QStringLiteral("phone")); QVERIFY(place.isEmpty()); // visibility diff --git a/tests/auto/qplacecategory/tst_qplacecategory.cpp b/tests/auto/qplacecategory/tst_qplacecategory.cpp index 1b2eaa8e..7ef98aab 100644 --- a/tests/auto/qplacecategory/tst_qplacecategory.cpp +++ b/tests/auto/qplacecategory/tst_qplacecategory.cpp @@ -121,7 +121,7 @@ void tst_QPlaceCategory::isEmptyTest() { QPlaceIcon icon; QVariantMap parameters; - parameters.insert(QLatin1String("para"), QLatin1String("meter")); + parameters.insert(QStringLiteral("para"), QStringLiteral("meter")); icon.setParameters(parameters); QVERIFY(!icon.isEmpty()); diff --git a/tests/auto/qplacecontactdetail/tst_qplacecontactdetail.cpp b/tests/auto/qplacecontactdetail/tst_qplacecontactdetail.cpp index 012701eb..6564f90c 100644 --- a/tests/auto/qplacecontactdetail/tst_qplacecontactdetail.cpp +++ b/tests/auto/qplacecontactdetail/tst_qplacecontactdetail.cpp @@ -72,19 +72,19 @@ void tst_QPlaceContactDetail::constructorTest() QVERIFY(detail.label().isEmpty()); QVERIFY(detail.value().isEmpty()); - detail.setLabel(QLatin1String("Emergency Services")); - detail.setValue(QLatin1String("0118 999")); + detail.setLabel(QStringLiteral("Emergency Services")); + detail.setValue(QStringLiteral("0118 999")); QPlaceContactDetail detail2(detail); - QCOMPARE(detail2.label(), QLatin1String("Emergency Services")); - QCOMPARE(detail2.value(), QLatin1String("0118 999")); + QCOMPARE(detail2.label(), QStringLiteral("Emergency Services")); + QCOMPARE(detail2.value(), QStringLiteral("0118 999")); } void tst_QPlaceContactDetail::labelTest() { QPlaceContactDetail detail; - detail.setLabel(QLatin1String("home")); - QCOMPARE(detail.label(), QLatin1String("home")); + detail.setLabel(QStringLiteral("home")); + QCOMPARE(detail.label(), QStringLiteral("home")); detail.setLabel(QString()); QVERIFY(detail.label().isEmpty()); } @@ -92,8 +92,8 @@ void tst_QPlaceContactDetail::labelTest() void tst_QPlaceContactDetail::valueTest() { QPlaceContactDetail detail; - detail.setValue(QLatin1String("555-5555")); - QCOMPARE(detail.value(), QLatin1String("555-5555")); + detail.setValue(QStringLiteral("555-5555")); + QCOMPARE(detail.value(), QStringLiteral("555-5555")); detail.setValue(QString()); QVERIFY(detail.value().isEmpty()); } @@ -101,8 +101,8 @@ void tst_QPlaceContactDetail::valueTest() void tst_QPlaceContactDetail::clearTest() { QPlaceContactDetail detail; - detail.setLabel(QLatin1String("Ghostbusters")); - detail.setValue(QLatin1String("555-2368")); + detail.setLabel(QStringLiteral("Ghostbusters")); + detail.setValue(QStringLiteral("555-2368")); detail.clear(); QVERIFY(detail.label().isEmpty()); QVERIFY(detail.value().isEmpty()); @@ -111,12 +111,12 @@ void tst_QPlaceContactDetail::clearTest() void tst_QPlaceContactDetail::operatorsTest() { QPlaceContactDetail detail1; - detail1.setLabel(QLatin1String("Kramer")); - detail1.setValue(QLatin1String("555-filk")); + detail1.setLabel(QStringLiteral("Kramer")); + detail1.setValue(QStringLiteral("555-filk")); QPlaceContactDetail detail2; - detail2.setLabel(QLatin1String("Kramer")); - detail2.setValue(QLatin1String("555-filk")); + detail2.setLabel(QStringLiteral("Kramer")); + detail2.setValue(QStringLiteral("555-filk")); QVERIFY(detail1 == detail2); QVERIFY(!(detail1 != detail2)); @@ -136,10 +136,10 @@ void tst_QPlaceContactDetail::operatorsTest() QVERIFY(!(detail3 != detail1)); QFETCH(QString, field); - if (field == QLatin1String("label")) - detail3.setLabel(QLatin1String("Cosmo")); - else if (field == QLatin1String("value")) - detail3.setValue(QLatin1String("555-5555")); + if (field == QStringLiteral("label")) + detail3.setLabel(QStringLiteral("Cosmo")); + else if (field == QStringLiteral("value")) + detail3.setValue(QStringLiteral("555-5555")); QVERIFY(!(detail1 == detail3)); QVERIFY(detail1 != detail3); diff --git a/tests/auto/qplacedetailsreply/tst_qplacedetailsreply.cpp b/tests/auto/qplacedetailsreply/tst_qplacedetailsreply.cpp index 5034217c..3d801cd2 100644 --- a/tests/auto/qplacedetailsreply/tst_qplacedetailsreply.cpp +++ b/tests/auto/qplacedetailsreply/tst_qplacedetailsreply.cpp @@ -90,7 +90,7 @@ void tst_QPlaceDetailsReply::placeTest() { TestDetailsReply *reply = new TestDetailsReply(this); QPlace place; - place.setName(QLatin1String("Gotham City")); + place.setName(QStringLiteral("Gotham City")); reply->setPlace(place); QCOMPARE(reply->place(), place); diff --git a/tests/auto/qplaceimage/tst_qplaceimage.cpp b/tests/auto/qplaceimage/tst_qplaceimage.cpp index 2992342c..57a26c90 100644 --- a/tests/auto/qplaceimage/tst_qplaceimage.cpp +++ b/tests/auto/qplaceimage/tst_qplaceimage.cpp @@ -152,8 +152,8 @@ void tst_QPlaceImage::attributionTest() { QPlaceImage image; QVERIFY(image.attribution().isEmpty()); - image.setAttribution(QLatin1String("Brought to you by acme")); - QCOMPARE(image.attribution(), QLatin1String("Brought to you by acme")); + image.setAttribution(QStringLiteral("Brought to you by acme")); + QCOMPARE(image.attribution(), QStringLiteral("Brought to you by acme")); image.setAttribution(QString()); QVERIFY(image.attribution().isEmpty()); } diff --git a/tests/auto/qplacemanager/tst_qplacemanager.cpp b/tests/auto/qplacemanager/tst_qplacemanager.cpp index f3322748..7bc4cf22 100644 --- a/tests/auto/qplacemanager/tst_qplacemanager.cpp +++ b/tests/auto/qplacemanager/tst_qplacemanager.cpp @@ -105,7 +105,7 @@ void tst_QPlaceManager::initTestCase() void tst_QPlaceManager::testMetadata() { - QCOMPARE(placeManager->managerName(), QLatin1String("qmlgeo.test.plugin")); + QCOMPARE(placeManager->managerName(), QStringLiteral("qmlgeo.test.plugin")); QCOMPARE(placeManager->managerVersion(), 100); } @@ -139,13 +139,13 @@ void tst_QPlaceManager::testMatchUnsupported() void tst_QPlaceManager::compatiblePlace() { QPlace place; - place.setPlaceId(QLatin1String("4-8-15-16-23-42")); - place.setName(QLatin1String("Island")); + place.setPlaceId(QStringLiteral("4-8-15-16-23-42")); + place.setName(QStringLiteral("Island")); place.setVisibility(QLocation::PublicVisibility); QPlace compatPlace = placeManager->compatiblePlace(place); QVERIFY(compatPlace.placeId().isEmpty()); - QCOMPARE(compatPlace.name(), QLatin1String("Island")); + QCOMPARE(compatPlace.name(), QStringLiteral("Island")); QCOMPARE(compatPlace.visibility(), QLocation::UnspecifiedVisibility); } diff --git a/tests/auto/qplacemanager_nokia/tst_qplacemanager_nokia.cpp b/tests/auto/qplacemanager_nokia/tst_qplacemanager_nokia.cpp index c8128925..0e6f3043 100644 --- a/tests/auto/qplacemanager_nokia/tst_qplacemanager_nokia.cpp +++ b/tests/auto/qplacemanager_nokia/tst_qplacemanager_nokia.cpp @@ -102,7 +102,7 @@ void tst_QPlaceManagerNokia::initTestCase() void tst_QPlaceManagerNokia::unsupportedFunctions() { QPlace place; - place.setName(QLatin1String("Brisbane")); + place.setName(QStringLiteral("Brisbane")); QPlaceIdReply *savePlaceReply = placeManager->savePlace(place); QVERIFY(savePlaceReply); QVERIFY(checkSignals(savePlaceReply, QPlaceReply::UnsupportedError)); @@ -114,7 +114,7 @@ void tst_QPlaceManagerNokia::unsupportedFunctions() QCOMPARE(removePlaceReply->operationType(), QPlaceIdReply::RemovePlace); QPlaceCategory category; - category.setName(QLatin1String("Accommodation")); + category.setName(QStringLiteral("Accommodation")); QPlaceIdReply *saveCategoryReply = placeManager->saveCategory(category); QVERIFY(saveCategoryReply); QVERIFY(checkSignals(saveCategoryReply, QPlaceReply::UnsupportedError)); diff --git a/tests/auto/qplacemanager_unsupported/tst_qplacemanager_unsupported.cpp b/tests/auto/qplacemanager_unsupported/tst_qplacemanager_unsupported.cpp index ad14db1e..6dc31a7a 100644 --- a/tests/auto/qplacemanager_unsupported/tst_qplacemanager_unsupported.cpp +++ b/tests/auto/qplacemanager_unsupported/tst_qplacemanager_unsupported.cpp @@ -117,7 +117,7 @@ void tst_QPlaceManagerUnsupported::cleanupTestCase() void tst_QPlaceManagerUnsupported::testMetadata() { - QCOMPARE(m_manager->managerName(), QLatin1String("test.places.unsupported")); + QCOMPARE(m_manager->managerName(), QStringLiteral("test.places.unsupported")); QCOMPARE(m_manager->managerVersion(), 1); QCOMPARE(m_provider->placesFeatures(), QGeoServiceProvider::NoPlacesFeatures); } @@ -210,8 +210,8 @@ void tst_QPlaceManagerUnsupported::testCategories() void tst_QPlaceManagerUnsupported::compatiblePlace() { QPlace place; - place.setPlaceId(QLatin1String("4-8-15-16-23-42")); - place.setName(QLatin1String("Island")); + place.setPlaceId(QStringLiteral("4-8-15-16-23-42")); + place.setName(QStringLiteral("Island")); place.setVisibility(QLocation::PublicVisibility); QPlace compatPlace = m_manager->compatiblePlace(place); diff --git a/tests/auto/qplacematchreply/tst_qplacematchreply.cpp b/tests/auto/qplacematchreply/tst_qplacematchreply.cpp index d89e34e3..aeae448e 100644 --- a/tests/auto/qplacematchreply/tst_qplacematchreply.cpp +++ b/tests/auto/qplacematchreply/tst_qplacematchreply.cpp @@ -100,10 +100,10 @@ void tst_QPlaceMatchReply::requestTest() QPlaceMatchRequest request; QPlace place1; - place1.setName(QLatin1String("place1")); + place1.setName(QStringLiteral("place1")); QPlace place2; - place2.setName(QLatin1String("place2")); + place2.setName(QStringLiteral("place2")); QList<QPlace> places; places << place1 << place2; diff --git a/tests/auto/qplacematchrequest/tst_qplacematchrequest.cpp b/tests/auto/qplacematchrequest/tst_qplacematchrequest.cpp index 90aa8e31..9efab1ad 100644 --- a/tests/auto/qplacematchrequest/tst_qplacematchrequest.cpp +++ b/tests/auto/qplacematchrequest/tst_qplacematchrequest.cpp @@ -70,13 +70,13 @@ void tst_QPlaceMatchRequest::constructorTest() { QPlaceMatchRequest request; QVariantMap params; - params.insert(QLatin1String("key"), QLatin1String("val")); + params.insert(QStringLiteral("key"), QStringLiteral("val")); QPlace place1; - place1.setName(QLatin1String("place1")); + place1.setName(QStringLiteral("place1")); QPlace place2; - place2.setName(QLatin1String("place2")); + place2.setName(QStringLiteral("place2")); QList<QPlace> places; places << place1 << place2; @@ -96,10 +96,10 @@ void tst_QPlaceMatchRequest::placesTest() QCOMPARE(request.places().count(), 0); QPlace place1; - place1.setName(QLatin1String("place1")); + place1.setName(QStringLiteral("place1")); QPlace place2; - place2.setName(QLatin1String("place2")); + place2.setName(QStringLiteral("place2")); QList<QPlace> places; places << place1 << place2; @@ -117,12 +117,12 @@ void tst_QPlaceMatchRequest::resultsTest() QCOMPARE(request.places().count(), 0); QPlace place1; - place1.setName(QLatin1String("place1")); + place1.setName(QStringLiteral("place1")); QPlaceResult result1; result1.setPlace(place1); QPlace place2; - place2.setName(QLatin1String("place2")); + place2.setName(QStringLiteral("place2")); QPlaceResult result2; result2.setPlace(place2); @@ -145,7 +145,7 @@ void tst_QPlaceMatchRequest::parametersTest() QVERIFY(request.parameters().isEmpty()); QVariantMap params; - params.insert(QLatin1String("key"), QLatin1String("value")); + params.insert(QStringLiteral("key"), QStringLiteral("value")); request.setParameters(params); QCOMPARE(request.parameters(), params); @@ -155,13 +155,13 @@ void tst_QPlaceMatchRequest::clearTest() { QPlaceMatchRequest request; QVariantMap params; - params.insert(QLatin1String("key"), QLatin1String("value")); + params.insert(QStringLiteral("key"), QStringLiteral("value")); QPlace place1; - place1.setName(QLatin1String("place1")); + place1.setName(QStringLiteral("place1")); QPlace place2; - place2.setName(QLatin1String("place2")); + place2.setName(QStringLiteral("place2")); QList<QPlace> places; places << place1 << place2; diff --git a/tests/auto/qplacereply/tst_qplacereply.cpp b/tests/auto/qplacereply/tst_qplacereply.cpp index 491a6f1f..3a979886 100644 --- a/tests/auto/qplacereply/tst_qplacereply.cpp +++ b/tests/auto/qplacereply/tst_qplacereply.cpp @@ -106,9 +106,9 @@ void tst_QPlaceReply::errorTest() QCOMPARE(reply->error(), QPlaceReply::NoError); QCOMPARE(reply->errorString(), QString()); - reply->setError(QPlaceReply::CommunicationError, QLatin1String("Could not connect to server")); + reply->setError(QPlaceReply::CommunicationError, QStringLiteral("Could not connect to server")); QCOMPARE(reply->error(), QPlaceReply::CommunicationError); - QCOMPARE(reply->errorString(), QLatin1String("Could not connect to server")); + QCOMPARE(reply->errorString(), QStringLiteral("Could not connect to server")); reply->setError(QPlaceReply::NoError, QString()); QCOMPARE(reply->error(), QPlaceReply::NoError); diff --git a/tests/auto/qplaceresult/tst_qplaceresult.cpp b/tests/auto/qplaceresult/tst_qplaceresult.cpp index 01a7028e..884a2d1c 100644 --- a/tests/auto/qplaceresult/tst_qplaceresult.cpp +++ b/tests/auto/qplaceresult/tst_qplaceresult.cpp @@ -114,7 +114,7 @@ void tst_QPlaceResult::constructorTest() QPlaceIcon icon; QVariantMap parameters; - parameters.insert(QLatin1String("paramKey"), QLatin1String("paramValue")); + parameters.insert(QStringLiteral("paramKey"), QStringLiteral("paramValue")); icon.setParameters(parameters); result.setIcon(icon); @@ -188,7 +188,7 @@ void tst_QPlaceResult::icon() QPlaceIcon icon; QVariantMap iconParams; - iconParams.insert(QLatin1String("paramKey"), QLatin1String("paramValue")); + iconParams.insert(QStringLiteral("paramKey"), QStringLiteral("paramValue")); icon.setParameters(iconParams); result.setIcon(icon); QCOMPARE(result.icon(), icon); diff --git a/tests/auto/qplacereview/tst_qplacereview.cpp b/tests/auto/qplacereview/tst_qplacereview.cpp index d2550502..eaf3d54e 100644 --- a/tests/auto/qplacereview/tst_qplacereview.cpp +++ b/tests/auto/qplacereview/tst_qplacereview.cpp @@ -209,12 +209,12 @@ void tst_QPlaceReview::userTest() QVERIFY(review.user().userId().isEmpty()); QVERIFY(review.user().name().isEmpty()); QPlaceUser user; - user.setUserId(QLatin1String("11111")); - user.setName(QLatin1String("Bob")); + user.setUserId(QStringLiteral("11111")); + user.setName(QStringLiteral("Bob")); review.setUser(user); - QCOMPARE(review.user().userId(), QLatin1String("11111")); - QCOMPARE(review.user().name(), QLatin1String("Bob")); + QCOMPARE(review.user().userId(), QStringLiteral("11111")); + QCOMPARE(review.user().name(), QStringLiteral("Bob")); review.setUser(QPlaceUser()); QVERIFY(review.user().userId().isEmpty()); diff --git a/tests/auto/qplacesearchrequest/tst_qplacesearchrequest.cpp b/tests/auto/qplacesearchrequest/tst_qplacesearchrequest.cpp index bd7589dd..de9842a7 100644 --- a/tests/auto/qplacesearchrequest/tst_qplacesearchrequest.cpp +++ b/tests/auto/qplacesearchrequest/tst_qplacesearchrequest.cpp @@ -192,20 +192,20 @@ void tst_QPlaceSearchRequest::searchContextTest() { QPlaceSearchRequest request; QVERIFY(!request.searchContext().value<QUrl>().isValid()); - request.setSearchContext(QUrl(QLatin1String("http://www.example.com/"))); - QCOMPARE(request.searchContext().value<QUrl>(), QUrl(QLatin1String("http://www.example.com/"))); + request.setSearchContext(QUrl(QStringLiteral("http://www.example.com/"))); + QCOMPARE(request.searchContext().value<QUrl>(), QUrl(QStringLiteral("http://www.example.com/"))); } void tst_QPlaceSearchRequest::operatorsTest() { QPlaceSearchRequest testObj; - testObj.setSearchTerm(QLatin1String("testValue")); + testObj.setSearchTerm(QStringLiteral("testValue")); QPlaceSearchRequest testObj2; testObj2 = testObj; QVERIFY2(testObj == testObj2, "Not copied correctly"); - testObj2.setSearchTerm(QLatin1String("abc")); + testObj2.setSearchTerm(QStringLiteral("abc")); QVERIFY2(testObj != testObj2, "Object should be different"); - testObj2.setSearchTerm(QLatin1String("testValue")); + testObj2.setSearchTerm(QStringLiteral("testValue")); QVERIFY(testObj == testObj2); QGeoRectangle b1(QGeoCoordinate(20,20), QGeoCoordinate(10,30)); @@ -255,7 +255,7 @@ void tst_QPlaceSearchRequest::operatorsTest() //test that different search contexts do not match testObj.clear(); testObj2.clear(); - testObj2.setSearchContext(QUrl(QLatin1String("http://www.example.com/"))); + testObj2.setSearchContext(QUrl(QStringLiteral("http://www.example.com/"))); QVERIFY(testObj != testObj2); } diff --git a/tests/auto/qplacesearchresult/tst_qplacesearchresult.cpp b/tests/auto/qplacesearchresult/tst_qplacesearchresult.cpp index 15dc82ba..346e15e7 100644 --- a/tests/auto/qplacesearchresult/tst_qplacesearchresult.cpp +++ b/tests/auto/qplacesearchresult/tst_qplacesearchresult.cpp @@ -65,17 +65,17 @@ void tst_QPlaceSearchResult::constructorTest() QVERIFY(result.title().isEmpty()); QVERIFY(result.icon().isEmpty()); - result.setTitle(QLatin1String("title")); + result.setTitle(QStringLiteral("title")); QPlaceIcon icon; QVariantMap parameters; - parameters.insert(QLatin1String("paramKey"), QLatin1String("paramValue")); + parameters.insert(QStringLiteral("paramKey"), QStringLiteral("paramValue")); icon.setParameters(parameters); result.setIcon(icon); QPlaceSearchResult result2(result); - QCOMPARE(result2.title(), QLatin1String("title")); - QCOMPARE(result2.icon().parameters().value(QLatin1String("paramKey")).toString(), - QLatin1String("paramValue")); + QCOMPARE(result2.title(), QStringLiteral("title")); + QCOMPARE(result2.icon().parameters().value(QStringLiteral("paramKey")).toString(), + QStringLiteral("paramValue")); QCOMPARE(result2, result); } @@ -84,8 +84,8 @@ void tst_QPlaceSearchResult::title() { QPlaceSearchResult result; QVERIFY(result.title().isEmpty()); - result.setTitle(QLatin1String("title")); - QCOMPARE(result.title(), QLatin1String("title")); + result.setTitle(QStringLiteral("title")); + QCOMPARE(result.title(), QStringLiteral("title")); result.setTitle(QString()); QVERIFY(result.title().isEmpty()); } @@ -96,7 +96,7 @@ void tst_QPlaceSearchResult::icon() QVERIFY(result.icon().isEmpty()); QPlaceIcon icon; QVariantMap iconParams; - iconParams.insert(QLatin1String("paramKey"), QLatin1String("paramValue")); + iconParams.insert(QStringLiteral("paramKey"), QStringLiteral("paramValue")); result.setIcon(icon); QCOMPARE(result.icon(), icon); result.setIcon(QPlaceIcon()); @@ -111,11 +111,11 @@ void tst_QPlaceSearchResult::operators() QVERIFY(result1 == result2); QVERIFY(!(result1 != result2)); - result1.setTitle(QLatin1String("title")); + result1.setTitle(QStringLiteral("title")); QVERIFY(!(result1 == result2)); QVERIFY(result1 != result2); - result2.setTitle(QLatin1String("title")); + result2.setTitle(QStringLiteral("title")); QVERIFY(result1 == result2); QVERIFY(!(result1 != result2)); } diff --git a/tests/auto/qplacesearchsuggestionreply/tst_qplacesearchsuggestionreply.cpp b/tests/auto/qplacesearchsuggestionreply/tst_qplacesearchsuggestionreply.cpp index 7eba2283..f2ec4548 100644 --- a/tests/auto/qplacesearchsuggestionreply/tst_qplacesearchsuggestionreply.cpp +++ b/tests/auto/qplacesearchsuggestionreply/tst_qplacesearchsuggestionreply.cpp @@ -93,8 +93,8 @@ void tst_QPlaceSearchSuggestionReply::typeTest() void tst_QPlaceSearchSuggestionReply::suggestionsTest() { QStringList suggestions; - suggestions << QLatin1String("one") << QLatin1String("two") - << QLatin1String("three"); + suggestions << QStringLiteral("one") << QStringLiteral("two") + << QStringLiteral("three"); SuggestionReply *reply = new SuggestionReply(this); reply->setSuggestions(suggestions); diff --git a/tests/auto/qplacesupplier/tst_qplacesupplier.cpp b/tests/auto/qplacesupplier/tst_qplacesupplier.cpp index 78cef978..d5120e74 100644 --- a/tests/auto/qplacesupplier/tst_qplacesupplier.cpp +++ b/tests/auto/qplacesupplier/tst_qplacesupplier.cpp @@ -123,18 +123,18 @@ void tst_QPlaceSupplier::iconTest() void tst_QPlaceSupplier::operatorsTest() { QPlaceSupplier testObj; - testObj.setName(QLatin1String("Acme")); + testObj.setName(QStringLiteral("Acme")); QPlaceIcon icon; QVariantMap iconParams; iconParams.insert(QPlaceIcon::SingleUrl, QUrl::fromEncoded("http://example.com/icon.png")); icon.setParameters(iconParams); testObj.setIcon(icon); - testObj.setSupplierId(QLatin1String("34292")); + testObj.setSupplierId(QStringLiteral("34292")); QPlaceSupplier testObj2; testObj2 = testObj; QVERIFY2(testObj == testObj2, "Not copied correctly"); - testObj2.setSupplierId(QLatin1String("testValue2")); + testObj2.setSupplierId(QStringLiteral("testValue2")); QVERIFY2(testObj != testObj2, "Object should be different"); } @@ -142,7 +142,7 @@ void tst_QPlaceSupplier::isEmptyTest() { QPlaceIcon icon; QVariantMap iconParametersMap; - iconParametersMap.insert(QLatin1String("Para"), QLatin1String("meter")); + iconParametersMap.insert(QStringLiteral("Para"), QStringLiteral("meter")); icon.setParameters(iconParametersMap); QVERIFY(!icon.isEmpty()); @@ -151,19 +151,19 @@ void tst_QPlaceSupplier::isEmptyTest() QVERIFY(supplier.isEmpty()); // name - supplier.setName(QLatin1String("Name")); + supplier.setName(QStringLiteral("Name")); QVERIFY(!supplier.isEmpty()); supplier.setName(QString()); QVERIFY(supplier.isEmpty()); // supplierId - supplier.setSupplierId(QLatin1String("1")); + supplier.setSupplierId(QStringLiteral("1")); QVERIFY(!supplier.isEmpty()); supplier.setSupplierId(QString()); QVERIFY(supplier.isEmpty()); // url - supplier.setUrl(QUrl(QLatin1String("www.example.com"))); + supplier.setUrl(QUrl(QStringLiteral("www.example.com"))); QVERIFY(!supplier.isEmpty()); supplier.setUrl(QUrl()); QVERIFY(supplier.isEmpty()); diff --git a/tests/auto/qplaceuser/tst_qplaceuser.cpp b/tests/auto/qplaceuser/tst_qplaceuser.cpp index 3c53917c..2e045236 100644 --- a/tests/auto/qplaceuser/tst_qplaceuser.cpp +++ b/tests/auto/qplaceuser/tst_qplaceuser.cpp @@ -71,19 +71,19 @@ void tst_QPlaceUser::constructorTest() QVERIFY(user.name().isEmpty()); QVERIFY(user.userId().isEmpty()); - user.setName(QLatin1String("Thomas Anderson")); - user.setUserId(QLatin1String("Neo")); + user.setName(QStringLiteral("Thomas Anderson")); + user.setUserId(QStringLiteral("Neo")); QPlaceUser user2(user); - QCOMPARE(user2.name(), QLatin1String("Thomas Anderson")); - QCOMPARE(user2.userId(), QLatin1String("Neo")); + QCOMPARE(user2.name(), QStringLiteral("Thomas Anderson")); + QCOMPARE(user2.userId(), QStringLiteral("Neo")); } void tst_QPlaceUser::nameTest() { QPlaceUser user; - user.setName(QLatin1String("Thomas Anderson")); - QCOMPARE(user.name(), QLatin1String("Thomas Anderson")); + user.setName(QStringLiteral("Thomas Anderson")); + QCOMPARE(user.name(), QStringLiteral("Thomas Anderson")); user.setName(QString()); QVERIFY(user.name().isEmpty()); } @@ -91,8 +91,8 @@ void tst_QPlaceUser::nameTest() void tst_QPlaceUser::userIdTest() { QPlaceUser user; - user.setUserId(QLatin1String("Neo")); - QCOMPARE(user.userId(), QLatin1String("Neo")); + user.setUserId(QStringLiteral("Neo")); + QCOMPARE(user.userId(), QStringLiteral("Neo")); user.setUserId(QString()); QVERIFY(user.userId().isEmpty()); } @@ -100,12 +100,12 @@ void tst_QPlaceUser::userIdTest() void tst_QPlaceUser::operatorsTest() { QPlaceUser user1; - user1.setName(QLatin1String("Thomas Anderson")); - user1.setUserId(QLatin1String("Neo")); + user1.setName(QStringLiteral("Thomas Anderson")); + user1.setUserId(QStringLiteral("Neo")); QPlaceUser user2; - user2.setName(QLatin1String("Thomas Anderson")); - user2.setUserId(QLatin1String("Neo")); + user2.setName(QStringLiteral("Thomas Anderson")); + user2.setUserId(QStringLiteral("Neo")); QVERIFY(user1 == user2); QVERIFY(!(user1 != user2)); @@ -126,10 +126,10 @@ void tst_QPlaceUser::operatorsTest() QFETCH(QString, field); - if (field == QLatin1String("name")) - user3.setName(QLatin1String("bob")); - else if (field == QLatin1String("userId")) - user3.setUserId(QLatin1String("Morpheus")); + if (field == QStringLiteral("name")) + user3.setName(QStringLiteral("bob")); + else if (field == QStringLiteral("userId")) + user3.setUserId(QStringLiteral("Morpheus")); else qFatal("Unknown data field"); diff --git a/tests/auto/qproposedsearchresult/tst_qproposedsearchresult.cpp b/tests/auto/qproposedsearchresult/tst_qproposedsearchresult.cpp index 82e6df46..984d98c5 100644 --- a/tests/auto/qproposedsearchresult/tst_qproposedsearchresult.cpp +++ b/tests/auto/qproposedsearchresult/tst_qproposedsearchresult.cpp @@ -112,7 +112,7 @@ void tst_QPlaceProposedSearchResult::constructorTest() QPlaceIcon icon; QVariantMap parameters; - parameters.insert(QLatin1String("paramKey"), QLatin1String("paramValue")); + parameters.insert(QStringLiteral("paramKey"), QStringLiteral("paramValue")); icon.setParameters(parameters); result.setIcon(icon); @@ -181,7 +181,7 @@ void tst_QPlaceProposedSearchResult::icon() QPlaceIcon icon; QVariantMap iconParams; - iconParams.insert(QLatin1String("paramKey"), QLatin1String("paramValue")); + iconParams.insert(QStringLiteral("paramKey"), QStringLiteral("paramValue")); icon.setParameters(iconParams); result.setIcon(icon); QCOMPARE(result.icon(), icon); |