diff options
author | Peter Varga <pvarga@inf.u-szeged.hu> | 2023-02-01 09:39:14 +0100 |
---|---|---|
committer | Peter Varga <pvarga@inf.u-szeged.hu> | 2023-02-02 10:55:21 +0100 |
commit | b4cf9c2e0520ec39ef064955ec025f5941e4c04a (patch) | |
tree | 527ad8d308ace8a80082d9a12eb27e3f5c758089 /tests | |
parent | 459b93b12c6d896ac1ff85ebe143b3176e3c4ffc (diff) | |
download | qtwebengine-b4cf9c2e0520ec39ef064955ec025f5941e4c04a.tar.gz |
Replace uses of deprecated _qs with _s
Pick-to: 6.4 6.5
Task-number: QTBUG-101408
Change-Id: Ie8a7944c3ded5662953bed00f022905f5805275e
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/auto/pdfquick/multipageview/tst_multipageview.cpp | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/tests/auto/pdfquick/multipageview/tst_multipageview.cpp b/tests/auto/pdfquick/multipageview/tst_multipageview.cpp index 48cec928f..764a69959 100644 --- a/tests/auto/pdfquick/multipageview/tst_multipageview.cpp +++ b/tests/auto/pdfquick/multipageview/tst_multipageview.cpp @@ -12,6 +12,8 @@ #include <QtPdfQuick/private/qquickpdfpageimage_p.h> #include "../shared/util.h" +using namespace Qt::StringLiterals; + Q_LOGGING_CATEGORY(lcTests, "qt.pdf.tests") class tst_MultiPageView : public QQuickDataTest @@ -257,7 +259,7 @@ void tst_MultiPageView::password() // actual QPdfDocument::pageCountChanged(int), for comparison with the illusory QQuickPdfDocument::pageCountChanged QVERIFY(extPageCountChangedSpy.isValid()); - QVERIFY(pdfView->setProperty("source", u"pdf-sample.protected.pdf"_qs)); + QVERIFY(pdfView->setProperty("source", u"pdf-sample.protected.pdf"_s)); QTRY_COMPARE(passwordRequiredSpy.size(), 1); qCDebug(lcTests) << "error while awaiting password" << doc->error() @@ -268,7 +270,7 @@ void tst_MultiPageView::password() QCOMPARE(extPageCountChangedSpy.size(), 0); QCOMPARE(statusChangedSpy.size(), 2); // Loading and then Error statusChangedSpy.clear(); - QVERIFY(doc->setProperty("password", u"Qt"_qs)); + QVERIFY(doc->setProperty("password", u"Qt"_s)); QCOMPARE(passwordChangedSpy.size(), 1); QTRY_COMPARE(doc->property("status").toInt(), int(QPdfDocument::Status::Ready)); qCDebug(lcTests) << "after setPassword" << doc->error() @@ -288,8 +290,8 @@ void tst_MultiPageView::selectionAndClipboard() QVERIFY(pdfView); QQuickPdfDocument *doc = pdfView->property("document").value<QQuickPdfDocument*>(); QVERIFY(doc); - QVERIFY(doc->setProperty("password", u"Qt"_qs)); - QVERIFY(pdfView->setProperty("source", u"pdf-sample.protected.pdf"_qs)); + QVERIFY(doc->setProperty("password", u"Qt"_s)); + QVERIFY(pdfView->setProperty("source", u"pdf-sample.protected.pdf"_s)); QTRY_COMPARE(pdfView->property("currentPageRenderingStatus").toInt(), QQuickPdfPageImage::Ready); QVERIFY(QMetaObject::invokeMethod(pdfView, "selectAll")); @@ -316,8 +318,8 @@ void tst_MultiPageView::search() QTRY_COMPARE(pdfView->width(), 200); QQuickPdfDocument *doc = pdfView->property("document").value<QQuickPdfDocument*>(); QVERIFY(doc); - QVERIFY(doc->setProperty("password", u"Qt"_qs)); - QVERIFY(pdfView->setProperty("source", u"pdf-sample.protected.pdf"_qs)); + QVERIFY(doc->setProperty("password", u"Qt"_s)); + QVERIFY(pdfView->setProperty("source", u"pdf-sample.protected.pdf"_s)); QTRY_COMPARE(pdfView->property("currentPageRenderingStatus").toInt(), QQuickPdfPageImage::Ready); QPdfSearchModel *searchModel = pdfView->property("searchModel").value<QPdfSearchModel*>(); QVERIFY(searchModel); @@ -328,7 +330,7 @@ void tst_MultiPageView::search() QObject *multiline = findFirstChild(firstPage, "QQuickPathMultiline"); QVERIFY(multiline); - pdfView->setProperty("searchString", u"PDF"_qs); + pdfView->setProperty("searchString", u"PDF"_s); QTRY_COMPARE(searchModel->rowCount(QModelIndex()), 7); // occurrences of the word "PDF" in this file const int count = searchModel->rowCount(QModelIndex()); QList<QList<QPointF>> resultOutlines = multiline->property("paths").value<QList<QList<QPointF>>>(); |