diff options
author | Liang Qi <liang.qi@qt.io> | 2020-02-18 09:26:53 +0100 |
---|---|---|
committer | Liang Qi <liang.qi@qt.io> | 2020-02-18 09:26:53 +0100 |
commit | b9585277e78f0571933706507ba2024c68d6df19 (patch) | |
tree | c98577aae762b75d0ac6437c1ec68da0ddb4426b /tests/auto/corelib/text/qstring | |
parent | eb2af9d923923255b276c6549ada1ed7839d5dd8 (diff) | |
parent | d7b6c4288f2de8b0123c888e83a3fbcd84ed906f (diff) |
Merge remote-tracking branch 'origin/5.14' into 5.15
Conflicts:
src/corelib/tools/qlinkedlist.h
src/plugins/platforms/wasm/qwasmintegration.cpp
src/plugins/platforms/wasm/qwasmscreen.cpp
Change-Id: Iefca7f9f4966bdc20e7052aca736874861055738
Diffstat (limited to 'tests/auto/corelib/text/qstring')
-rw-r--r-- | tests/auto/corelib/text/qstring/tst_qstring.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/auto/corelib/text/qstring/tst_qstring.cpp b/tests/auto/corelib/text/qstring/tst_qstring.cpp index 9cb76a0130..7072cb9516 100644 --- a/tests/auto/corelib/text/qstring/tst_qstring.cpp +++ b/tests/auto/corelib/text/qstring/tst_qstring.cpp @@ -4706,6 +4706,12 @@ void tst_QString::fromUcs4() s = QString::fromUcs4(U"\u221212\U000020AC\U00010000"); QCOMPARE(s, QString::fromUtf8("\342\210\222" "12" "\342\202\254" "\360\220\200\200")); #endif + + // QTBUG-62011: don't mistake ZWNBS for BOM + // Start with one BOM, to ensure we use the right endianness: + const uint text[] = { 0xfeff, 97, 0xfeff, 98, 0xfeff, 99, 0xfeff, 100 }; + s = QString::fromUcs4(text, 8); + QCOMPARE(s, QStringView(u"a\xfeff" u"b\xfeff" u"c\xfeff" "d")); } void tst_QString::toUcs4() |