summaryrefslogtreecommitdiffstats
path: root/tests/auto/corelib/text/qlocale/tst_qlocale.cpp
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/text/qlocale/tst_qlocale.cpp
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/text/qlocale/tst_qlocale.cpp')
-rw-r--r--tests/auto/corelib/text/qlocale/tst_qlocale.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/tests/auto/corelib/text/qlocale/tst_qlocale.cpp b/tests/auto/corelib/text/qlocale/tst_qlocale.cpp
index 52752690da..f2e4dc0ea9 100644
--- a/tests/auto/corelib/text/qlocale/tst_qlocale.cpp
+++ b/tests/auto/corelib/text/qlocale/tst_qlocale.cpp
@@ -910,7 +910,7 @@ void tst_QLocale::stringToDouble()
QFETCH(QString, num_str);
QFETCH(bool, good);
QFETCH(double, num);
- QStringRef num_strRef = num_str.leftRef(-1);
+ QStringView num_strRef{ num_str };
QLocale locale(locale_name);
QCOMPARE(locale.name(), locale_name);
@@ -996,7 +996,7 @@ void tst_QLocale::stringToFloat()
QFETCH(QString, num_str);
QFETCH(bool, good);
QFETCH(double, num);
- QStringRef num_strRef = num_str.leftRef(-1);
+ QStringView num_strRef{ num_str };
float fnum = num;
QLocale locale(locale_name);
@@ -1289,8 +1289,8 @@ void tst_QLocale::strtod()
QCOMPARE(actualOk, ok);
}
- // and QStringRef, but we can limit the length without allocating memory
- QStringRef num_strref(&num_str, 0, processed);
+ // and QStringView, but we can limit the length without allocating memory
+ QStringView num_strref = QStringView{ num_str }.mid(0, processed);
actualOk = false;
QCOMPARE(QLocale::c().toDouble(num_strref, &actualOk), num);
QCOMPARE(actualOk, ok);
@@ -1355,7 +1355,7 @@ void tst_QLocale::long_long_conversion()
QFETCH(QString, num_str);
QFETCH(bool, good);
QFETCH(qlonglong, num);
- QStringRef num_strRef = num_str.leftRef(-1);
+ QStringView num_strRef{ num_str };
QLocale locale(locale_name);
QCOMPARE(locale.name(), locale_name);