diff options
author | Peter Varga <pvarga@inf.u-szeged.hu> | 2023-02-01 09:39:14 +0100 |
---|---|---|
committer | Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> | 2023-02-03 08:11:48 +0000 |
commit | 976e0ead467c2c99005727701473dd46c13920ff (patch) | |
tree | 2ca97e05357f7ef51bf3e7b6baad0f7c2f54b49a | |
parent | 664192e18f0b65f75dd8298314c563063dea367f (diff) |
Replace uses of deprecated _qs with _s
Task-number: QTBUG-101408
Change-Id: Ie8a7944c3ded5662953bed00f022905f5805275e
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
(cherry picked from commit b4cf9c2e0520ec39ef064955ec025f5941e4c04a)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
-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>>>(); |