path: root/tests/auto/corelib/tools/qstring/tst_qstring.cpp
diff options
authorMarc Mutz <>2017-03-30 19:49:32 +0200
committerMarc Mutz <>2017-04-20 06:50:36 +0000
commit126c4eae84fee0e5bc4e9c6db167d92e87b7f612 (patch)
tree330dbd270045bc11f5b36208ae4b027bfe8ceb32 /tests/auto/corelib/tools/qstring/tst_qstring.cpp
parent3dcc075f4a5efce348a6fa00cf5a0adef97b1089 (diff)
Since commit bf2160e72cd8840a8e604438cbdc807483ac980a, we can rely on charNN_t support in all compilers except MSVC 2013, and since that commit, we use (in 5.10, not 5.9, yet) !defined(Q_OS_WIN) || defined(Q_COMPILER_UNICODE_STRINGS) when we only need charNN_t, the type, as opposed to its library support (u16string, char_traits<char16_t>, ...). This patch splits the Q_C_UNICODE_STRINGS macro into two, adding Q_STDLIB_UNICODE_STRINGS for when we need std::uNNstring, leaving Q_C_UNICODE_STRINGS for when we need just charNN_t support. In QDebug, when constructing a QChar out of a char16_t, cast to ushort first, since QChar(char16_t) was only officially introduced in Qt 5.10. [ChangeLog][Potentially Source-Incompatible Changes] The internal Q_COMPILER_UNICODE_STRINGS macro is now defined if the compiler supports charNN_t, even if the standard library does not. To check for availability of std::uNNstring, use the new Q_STDLIB_UNICODE_STRINGS macro. Change-Id: I8f210fd7f1799fe21faf54506475a759b1f76a59 Reviewed-by: Thiago Macieira <>
Diffstat (limited to 'tests/auto/corelib/tools/qstring/tst_qstring.cpp')
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/auto/corelib/tools/qstring/tst_qstring.cpp b/tests/auto/corelib/tools/qstring/tst_qstring.cpp
index 03436375dd..24f16b9911 100644
--- a/tests/auto/corelib/tools/qstring/tst_qstring.cpp
+++ b/tests/auto/corelib/tools/qstring/tst_qstring.cpp
@@ -5850,7 +5850,7 @@ void tst_QString::fromUtf16_char16()
void tst_QString::unicodeStrings()
QString s1, s2;
static const std::u16string u16str1(u"Hello Unicode World");
static const std::u32string u32str1(U"Hello Unicode World");
@@ -5865,7 +5865,7 @@ void tst_QString::unicodeStrings()
s1 = QString::fromStdU32String(std::u32string(U"\u221212\U000020AC\U00010000"));
QCOMPARE(s1, QString::fromUtf8("\342\210\222" "12" "\342\202\254" "\360\220\200\200"));
- QSKIP("Compiler does not support C++11 unicode strings");
+ QSKIP("Standard Library does not support C++11 unicode strings");