summaryrefslogtreecommitdiffstats
path: root/tests/auto/corelib/tools
diff options
context:
space:
mode:
authorKarsten Heimrich <karsten.heimrich@qt.io>2020-08-12 13:16:27 +0200
committerKarsten Heimrich <karsten.heimrich@qt.io>2020-08-20 00:58:13 +0200
commit2766322de37adba37e0d0d4b0054e55edff01c6c (patch)
treed487d502ee944963e103e11c9726c3efcd8fe041 /tests/auto/corelib/tools
parenteb7d1cf098df56f8ebf62f02af611a627435a4a1 (diff)
Move QStringRef and remains to Qt5Compat
Export some private functions from QUtf8 to resolve undefined symbols in Qt5Compat after moving QStringRef. Task-number: QTBUG-84437 Change-Id: I9046dcb14ed520d8868a511d79da6e721e26f72b Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'tests/auto/corelib/tools')
-rw-r--r--tests/auto/corelib/tools/containerapisymmetry/tst_containerapisymmetry.cpp2
-rw-r--r--tests/auto/corelib/tools/qhashfunctions/tst_qhashfunctions.cpp12
2 files changed, 2 insertions, 12 deletions
diff --git a/tests/auto/corelib/tools/containerapisymmetry/tst_containerapisymmetry.cpp b/tests/auto/corelib/tools/containerapisymmetry/tst_containerapisymmetry.cpp
index 733d8432bb..39cb8406cd 100644
--- a/tests/auto/corelib/tools/containerapisymmetry/tst_containerapisymmetry.cpp
+++ b/tests/auto/corelib/tools/containerapisymmetry/tst_containerapisymmetry.cpp
@@ -471,7 +471,6 @@ private Q_SLOTS:
void front_back_QList() { front_back_impl<QList<qintptr>>(); }
void front_back_QVarLengthArray() { front_back_impl<QVarLengthArray<int>>(); }
void front_back_QString() { front_back_impl<QString>(); }
- void front_back_QStringRef() { front_back_impl<QStringRef>(); }
void front_back_QStringView() { front_back_impl<QStringView>(); }
void front_back_QLatin1String() { front_back_impl<QLatin1String>(); }
void front_back_QByteArray() { front_back_impl<QByteArray>(); }
@@ -773,7 +772,6 @@ Container make(int size)
static QString s_string = QStringLiteral("\1\2\3\4\5\6\7");
-template <> QStringRef make(int size) { return s_string.leftRef(size); }
template <> QStringView make(int size) { return QStringView(s_string).left(size); }
template <> QLatin1String make(int size) { return QLatin1String("\1\2\3\4\5\6\7", size); }
diff --git a/tests/auto/corelib/tools/qhashfunctions/tst_qhashfunctions.cpp b/tests/auto/corelib/tools/qhashfunctions/tst_qhashfunctions.cpp
index 13f9b46eaa..f04e1bdb12 100644
--- a/tests/auto/corelib/tools/qhashfunctions/tst_qhashfunctions.cpp
+++ b/tests/auto/corelib/tools/qhashfunctions/tst_qhashfunctions.cpp
@@ -69,12 +69,8 @@ private Q_SLOTS:
void tst_QHashFunctions::consistent()
{
// QString-like
- {
- const QString s = QStringLiteral("abcdefghijklmnopqrstuvxyz").repeated(16);
-
- QCOMPARE(qHash(s), qHash(QStringRef(&s)));
- QCOMPARE(qHash(s), qHash(QStringView(s)));
- }
+ const QString s = QStringLiteral("abcdefghijklmnopqrstuvxyz").repeated(16);
+ QCOMPARE(qHash(s), qHash(QStringView(s)));
}
void tst_QHashFunctions::initTestCase()
@@ -176,10 +172,6 @@ void tst_QHashFunctions::qhash_of_empty_and_null_qstring()
QCOMPARE(null, empty);
QCOMPARE(qHash(null, seed), qHash(empty, seed));
- QStringRef nullRef, emptyRef(&empty);
- QCOMPARE(nullRef, emptyRef);
- QCOMPARE(qHash(nullRef, seed), qHash(emptyRef, seed));
-
QStringView nullView, emptyView(empty);
QCOMPARE(nullView, emptyView);
QCOMPARE(qHash(nullView, seed), qHash(emptyView, seed));