diff options
Diffstat (limited to 'src/corelib/tools/qchar.h')
-rw-r--r-- | src/corelib/tools/qchar.h | 27 |
1 files changed, 26 insertions, 1 deletions
diff --git a/src/corelib/tools/qchar.h b/src/corelib/tools/qchar.h index 81ef67d116..84df8accc5 100644 --- a/src/corelib/tools/qchar.h +++ b/src/corelib/tools/qchar.h @@ -86,6 +86,15 @@ 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_COMPILER_UNICODE_STRINGS) + Q_DECL_CONSTEXPR QChar(char16_t ch) Q_DECL_NOTHROW : ucs(ushort(ch)) {} // implicit +#endif +#if defined(Q_OS_WIN) + Q_STATIC_ASSERT(sizeof(wchar_t) == sizeof(ushort)); +#endif +#if defined(Q_OS_WIN) || defined(Q_CLANG_QDOC) + Q_DECL_CONSTEXPR QChar(wchar_t ch) Q_DECL_NOTHROW : ucs(ushort(ch)) {} // implicit +#endif #ifndef QT_NO_CAST_FROM_ASCII QT_ASCII_CAST_WARN Q_DECL_CONSTEXPR explicit QChar(char c) Q_DECL_NOTHROW : ucs(uchar(c)) { } @@ -289,6 +298,20 @@ public: Script_OldHungarian, Script_SignWriting, + // Unicode 9.0 additions + Script_Adlam, + Script_Bhaiksuki, + Script_Marchen, + Script_Newa, + Script_Osage, + Script_Tangut, + + // Unicode 10.0 additions + Script_MasaramGondi, + Script_Nushu, + Script_Soyombo, + Script_ZanabazarSquare, + ScriptCount }; @@ -380,7 +403,9 @@ public: Unicode_6_2, Unicode_6_3, Unicode_7_0, - Unicode_8_0 + Unicode_8_0, + Unicode_9_0, + Unicode_10_0 }; // ****** WHEN ADDING FUNCTIONS, CONSIDER ADDING TO QCharRef TOO |