summaryrefslogtreecommitdiffstats
path: root/tests/auto/tools
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@qt.io>2020-05-30 23:29:21 +0200
committerLars Knoll <lars.knoll@qt.io>2020-06-05 09:07:14 +0200
commitc49728eb27be0f3f2eaaa77b0ed573f5d8705af1 (patch)
tree7115e967f463ab66c8df40dfd573cf5c8ddb8055 /tests/auto/tools
parent690abaac0e4bd57b5510e68730f7965c01a113da (diff)
Port qmake from QStringRef to QStringView
Change-Id: Ie07a976cd3c634e04c8b9b1e0a6cacd4c2d94939 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Diffstat (limited to 'tests/auto/tools')
-rw-r--r--tests/auto/tools/qmakelib/parsertest.cpp4
-rw-r--r--tests/auto/tools/qmakelib/tst_qmakelib.cpp3
2 files changed, 2 insertions, 5 deletions
diff --git a/tests/auto/tools/qmakelib/parsertest.cpp b/tests/auto/tools/qmakelib/parsertest.cpp
index b57ea75c34..3b0e47a5ac 100644
--- a/tests/auto/tools/qmakelib/parsertest.cpp
+++ b/tests/auto/tools/qmakelib/parsertest.cpp
@@ -40,8 +40,8 @@ public:
TokenStream &operator<<(ushort n) { ts += QChar(n); return *this; }
TokenStream &operator<<(uint n) { ts += QChar(n & 0xffff); ts += QChar(n >> 16); return *this; }
- TokenStream &operator<<(const QStringRef &s) { ts += s; return *this; }
- TokenStream &operator<<(const ProString &s) { return *this << ushort(s.length()) << s.toQStringRef(); }
+ TokenStream &operator<<(QStringView s) { ts += s; return *this; }
+ TokenStream &operator<<(const ProString &s) { return *this << ushort(s.length()) << s.toQStringView(); }
TokenStream &operator<<(const ProKey &s) { return *this << s.hash() << s.toString(); }
private:
diff --git a/tests/auto/tools/qmakelib/tst_qmakelib.cpp b/tests/auto/tools/qmakelib/tst_qmakelib.cpp
index 4a4b20fe50..3d66f940ff 100644
--- a/tests/auto/tools/qmakelib/tst_qmakelib.cpp
+++ b/tests/auto/tools/qmakelib/tst_qmakelib.cpp
@@ -76,10 +76,8 @@ void tst_qmakelib::proString()
QCOMPARE(ProString(qs2, 3, 13).trimmed().toQString(), QStringLiteral("spacy string"));
QCOMPARE(ProString(qs2, 1, 17).trimmed().toQString(), QStringLiteral("spacy string"));
- QVERIFY(s2.toQStringRef().string()->isSharedWith(qs1));
s2.prepend(ProString("there "));
QCOMPARE(s2.toQString(), QStringLiteral("there is a str"));
- QVERIFY(!s2.toQStringRef().string()->isSharedWith(qs1));
ProString s3("this is a longish string with bells and whistles");
s3 = s3.mid(18, 17);
@@ -129,7 +127,6 @@ void tst_qmakelib::proString()
ProString s5;
s5.append(sl2);
QCOMPARE(s5.toQString(), QStringLiteral("foo"));
- QVERIFY(s5.toQStringRef().string()->isSharedWith(*sl2.first().toQStringRef().string()));
QCOMPARE(ProString("one") + ProString(" more"), QStringLiteral("one more"));
}