diff options
author | Marc Mutz <marc.mutz@kdab.com> | 2017-04-20 19:53:44 +0200 |
---|---|---|
committer | Marc Mutz <marc.mutz@kdab.com> | 2017-04-20 18:10:59 +0000 |
commit | 5311eb0d8e0ddaad62f37c1191462ad2ae0e5c2d (patch) | |
tree | 57214d068feb4996f72b7924212222cb809b8ce5 /src/corelib/tools | |
parent | dc8bfab82eb051a516a4138e50f2d8de5095319e (diff) |
Use new Q_STDLIB_UNICODE_STRINGS and Q_COMPILER_UNICODE_STRINGS
... instead of the combination with Q_OS_WIN we used so far.
This patch adapts ocurrences that are new in 5.10.
Change-Id: If392df481713e56c776c2326e0e02324a3a80c89
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib/tools')
-rw-r--r-- | src/corelib/tools/qchar.h | 2 | ||||
-rw-r--r-- | src/corelib/tools/qstringview.h | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/corelib/tools/qchar.h b/src/corelib/tools/qchar.h index a1d31f6a68..53cb8993fb 100644 --- a/src/corelib/tools/qchar.h +++ b/src/corelib/tools/qchar.h @@ -86,7 +86,7 @@ public: Q_DECL_CONSTEXPR QChar(int rc) Q_DECL_NOTHROW : ucs(ushort(rc & 0xffff)) {} Q_DECL_CONSTEXPR QChar(SpecialCharacter s) Q_DECL_NOTHROW : ucs(ushort(s)) {} // implicit Q_DECL_CONSTEXPR QChar(QLatin1Char ch) Q_DECL_NOTHROW : ucs(ch.unicode()) {} // implicit -#if !defined(Q_OS_WIN) || defined(Q_COMPILER_UNICODE_STRINGS) +#if defined(Q_COMPILER_UNICODE_STRINGS) Q_DECL_CONSTEXPR QChar(char16_t ch) Q_DECL_NOTHROW : ucs(ushort(ch)) {} // implicit #endif #if defined(Q_OS_WIN) diff --git a/src/corelib/tools/qstringview.h b/src/corelib/tools/qstringview.h index 64d3aa2266..169a30ba69 100644 --- a/src/corelib/tools/qstringview.h +++ b/src/corelib/tools/qstringview.h @@ -61,7 +61,7 @@ struct IsCompatibleCharTypeHelper : std::integral_constant<bool, std::is_same<Char, QChar>::value || std::is_same<Char, ushort>::value || -#if !defined(Q_OS_WIN) || defined(Q_COMPILER_UNICODE_STRINGS) +#if defined(Q_COMPILER_UNICODE_STRINGS) std::is_same<Char, char16_t>::value || #endif (std::is_same<Char, wchar_t>::value && sizeof(wchar_t) == sizeof(QChar))> {}; |