summaryrefslogtreecommitdiffstats
path: root/tests/auto/corelib/plugin
diff options
context:
space:
mode:
authorMarc Mutz <marc.mutz@kdab.com>2020-06-09 12:02:57 +0200
committerMarc Mutz <marc.mutz@kdab.com>2021-07-30 22:54:28 +0200
commit615a9cf99150cfee34c14cfed0aa9583f5993934 (patch)
tree80f69ace058792b1faf39f27ef6f6de97fbe52a8 /tests/auto/corelib/plugin
parent09fba5cf3657c19c38e897a11a015d45b4328ae3 (diff)
QUuid: port to QAnyStringView
Remove the QString/QStringView/QLatin1String/const char* overloads from the API, but not the ABI. As a drive-by, replace a use of QStringView::left() by truncate(), as suggested by a comment. [ChangeLog][QtCore][QUuid] The from-string constructor and the fromString() function now take QAnyStringView (was: overload set with a subset of QString, QByteArray, const char*, QLatin1String, QStringView each). Change-Id: If7fa26cfbef9280480c78b669d9f5f14118995ed Reviewed-by: MÃ¥rten Nordheim <marten.nordheim@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'tests/auto/corelib/plugin')
-rw-r--r--tests/auto/corelib/plugin/quuid/tst_quuid.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/auto/corelib/plugin/quuid/tst_quuid.cpp b/tests/auto/corelib/plugin/quuid/tst_quuid.cpp
index 8240f2452a..1ff273e665 100644
--- a/tests/auto/corelib/plugin/quuid/tst_quuid.cpp
+++ b/tests/auto/corelib/plugin/quuid/tst_quuid.cpp
@@ -193,6 +193,11 @@ void tst_QUuid::fromString()
const auto longerInputL1 = inputL1 + '5'; // the '5' makes the premature end check incorrectly succeed
const auto inputL1S = QLatin1String(longerInputL1.data(), inputL1.size());
QCOMPARE(expected, QUuid::fromString(inputL1S));
+
+ // for QUtf8StringView, too:
+ const auto longerInputU8 = inputU8 + '5'; // the '5' makes the premature end check incorrectly succeed
+ const auto inputU8S = QUtf8StringView(longerInputU8.data(), inputU8.size());
+ QCOMPARE(expected, QUuid::fromString(inputU8S));
}
void tst_QUuid::toByteArray()