diff --git a/autotests/qml/qmlclipboardapitest.cpp b/autotests/qml/qmlclipboardapitest.cpp --- a/autotests/qml/qmlclipboardapitest.cpp +++ b/autotests/qml/qmlclipboardapitest.cpp @@ -32,7 +32,7 @@ void QmlClipboardApiTest::testClipboard() { m_testHelper.evaluate("Falkon.Clipboard.copy('this text is copied')"); - QCOMPARE(mApp->clipboard()->text(), "this text is copied"); + QCOMPARE(mApp->clipboard()->text(), QSL("this text is copied")); } FALKONTEST_MAIN(QmlClipboardApiTest) diff --git a/autotests/qml/qmlcookiesapitest.cpp b/autotests/qml/qmlcookiesapitest.cpp --- a/autotests/qml/qmlcookiesapitest.cpp +++ b/autotests/qml/qmlcookiesapitest.cpp @@ -41,7 +41,7 @@ "})"); QTRY_COMPARE(cookieAddSpy.count(), 1); QNetworkCookie netCookie = qvariant_cast(cookieAddSpy.at(0).at(0)); - QCOMPARE(netCookie.name(), "Example"); + QCOMPARE(netCookie.name(), QByteArrayLiteral("Example")); QObject *object = m_testHelper.evaluateQObject("Falkon.Cookies"); QVERIFY(object); QSignalSpy qmlCookieSpy(object, SIGNAL(changed(QVariantMap))); @@ -54,15 +54,15 @@ QVariantMap addedQmlCookieMap = QVariant(qmlCookieSpy.at(0).at(0)).toMap(); QObject *addedQmlCookie = qvariant_cast(addedQmlCookieMap.value("cookie")); bool removed = addedQmlCookieMap.value("removed").toBool(); - QCOMPARE(addedQmlCookie->property("name").toString(), "Hello"); + QCOMPARE(addedQmlCookie->property("name").toString(), QSL("Hello")); QCOMPARE(removed, false); mApp->webProfile()->cookieStore()->deleteCookie(netCookie); QTRY_COMPARE(qmlCookieSpy.count(), 2); QVariantMap removedQmlCookieMap = QVariant(qmlCookieSpy.at(1).at(0)).toMap(); QObject *removedQmlCookie = qvariant_cast(removedQmlCookieMap.value("cookie")); removed = removedQmlCookieMap.value("removed").toBool(); - QCOMPARE(removedQmlCookie->property("name").toString(), "Example"); + QCOMPARE(removedQmlCookie->property("name").toString(), QSL("Example")); QCOMPARE(removed, true); QSignalSpy cookieRemoveSpy(mApp->cookieJar(), &CookieJar::cookieRemoved); @@ -72,7 +72,7 @@ "})"); QTRY_COMPARE(cookieRemoveSpy.count(), 1); netCookie = qvariant_cast(cookieRemoveSpy.at(0).at(0)); - QCOMPARE(netCookie.name(), "Hello"); + QCOMPARE(netCookie.name(), QByteArrayLiteral("Hello")); } void QmlCookiesApiTest::testCookieGet() @@ -112,7 +112,7 @@ " url: '.mango-domain.com'" "})"); QVERIFY(mangoCookie); - QCOMPARE(mangoCookie->property("name").toString(), "Mango"); + QCOMPARE(mangoCookie->property("name").toString(), QSL("Mango")); QCOMPARE(mangoCookie->property("expirationDate").toDateTime(), actualMangoCookie.expirationDate()); QList mangoCookies = m_testHelper.evaluate("Falkon.Cookies.getAll({name: 'Mango'})").toVariant().toList(); diff --git a/autotests/qml/qmlhistoryapitest.cpp b/autotests/qml/qmlhistoryapitest.cpp --- a/autotests/qml/qmlhistoryapitest.cpp +++ b/autotests/qml/qmlhistoryapitest.cpp @@ -43,7 +43,7 @@ "})"); QTRY_COMPARE(historySpy.count(), 1); HistoryEntry entry = qvariant_cast(historySpy.at(0).at(0)); - QCOMPARE(entry.title, "Example Domain"); + QCOMPARE(entry.title, QSL("Example Domain")); auto object = m_testHelper.evaluateQObject("Falkon.History"); QSignalSpy qmlHistorySpy(object, SIGNAL(visited(QmlHistoryItem*))); diff --git a/autotests/qml/qmltabsapitest.cpp b/autotests/qml/qmltabsapitest.cpp --- a/autotests/qml/qmltabsapitest.cpp +++ b/autotests/qml/qmltabsapitest.cpp @@ -55,7 +55,7 @@ QVERIFY(qmlTabObject1); QCOMPARE(qmlTabObject1->property("index").toInt(), 0); QCOMPARE(qmlTabObject1->property("pinned").toBool(), false); - QTRY_COMPARE(qmlTabObject1->property("url").toString(), "https://example.com/"); + QTRY_COMPARE(qmlTabObject1->property("url").toString(), QSL("https://example.com/")); m_testHelper.evaluate("Falkon.Tabs.addTab({" " url: 'https://another-example.com/'," @@ -73,13 +73,13 @@ QVERIFY(qmlTabObject2); QCOMPARE(qmlTabObject2->property("index").toInt(), 0); QCOMPARE(qmlTabObject2->property("pinned").toBool(), true); - QTRY_COMPARE(qmlTabObject2->property("url").toString(), "https://another-example.com/"); + QTRY_COMPARE(qmlTabObject2->property("url").toString(), QSL("https://another-example.com/")); bool unpinnedTab = m_testHelper.evaluate("Falkon.Tabs.unpinTab({index: 0})").toBool(); QVERIFY(unpinnedTab); QObject *qmlTabObject3 = m_testHelper.evaluateQObject("Falkon.Tabs.get({index: 0})"); QVERIFY(qmlTabObject3); - QCOMPARE(qmlTabObject3->property("url").toString(), "https://another-example.com/"); + QCOMPARE(qmlTabObject3->property("url").toString(), QSL("https://another-example.com/")); QCOMPARE(qmlTabObject3->property("index").toInt(), 0); QCOMPARE(qmlTabObject3->property("pinned").toBool(), false); diff --git a/autotests/qml/qmltopsitesapitest.cpp b/autotests/qml/qmltopsitesapitest.cpp --- a/autotests/qml/qmltopsitesapitest.cpp +++ b/autotests/qml/qmltopsitesapitest.cpp @@ -37,8 +37,8 @@ QCOMPARE(list.length(), 1); QObject* object = qvariant_cast(list.at(0)); QVERIFY(object); - QCOMPARE(object->property("title").toString(), "Example Domain"); - QCOMPARE(object->property("url").toString(), "https://example.com"); + QCOMPARE(object->property("title").toString(), QSL("Example Domain")); + QCOMPARE(object->property("url").toString(), QSL("https://example.com")); } FALKONTEST_MAIN(QmlTopSitesApiTest)