diff options
Diffstat (limited to 'src/corelib/tools/qchar.cpp')
-rw-r--r-- | src/corelib/tools/qchar.cpp | 83 |
1 files changed, 53 insertions, 30 deletions
diff --git a/src/corelib/tools/qchar.cpp b/src/corelib/tools/qchar.cpp index dba0241cf9..56904c91d7 100644 --- a/src/corelib/tools/qchar.cpp +++ b/src/corelib/tools/qchar.cpp @@ -377,6 +377,29 @@ QT_BEGIN_NAMESPACE \value Script_Sharada \value Script_SoraSompeng \value Script_Takri + \value Script_CaucasianAlbanian + \value Script_BassaVah + \value Script_Duployan + \value Script_Elbasan + \value Script_Grantha + \value Script_PahawhHmong + \value Script_Khojki + \value Script_LinearA + \value Script_Mahajani + \value Script_Manichaean + \value Script_MendeKikakui + \value Script_Modi + \value Script_Mro + \value Script_OldNorthArabian + \value Script_Nabataean + \value Script_Palmyrene + \value Script_PauCinHau + \value Script_OldPermic + \value Script_PsalterPahlavi + \value Script_Siddham + \value Script_Khudawadi + \value Script_Tirhuta + \value Script_WarangCiti \omitvalue ScriptCount @@ -658,7 +681,7 @@ QT_BEGIN_NAMESPACE Note that this gives no indication of whether the character is available in a particular font. */ -bool QChar::isPrint(uint ucs4) +bool QChar::isPrint(uint ucs4) Q_DECL_NOTHROW { if (ucs4 > LastValidCodePoint) return false; @@ -691,7 +714,7 @@ bool QChar::isPrint(uint ucs4) /*! \internal */ -bool QT_FASTCALL QChar::isSpace_helper(uint ucs4) +bool QT_FASTCALL QChar::isSpace_helper(uint ucs4) Q_DECL_NOTHROW { if (ucs4 > LastValidCodePoint) return false; @@ -717,7 +740,7 @@ bool QT_FASTCALL QChar::isSpace_helper(uint ucs4) Returns \c true if the UCS-4-encoded character specified by \a ucs4 is a mark (Mark_* categories); otherwise returns \c false. */ -bool QChar::isMark(uint ucs4) +bool QChar::isMark(uint ucs4) Q_DECL_NOTHROW { if (ucs4 > LastValidCodePoint) return false; @@ -741,7 +764,7 @@ bool QChar::isMark(uint ucs4) Returns \c true if the UCS-4-encoded character specified by \a ucs4 is a punctuation mark (Punctuation_* categories); otherwise returns \c false. */ -bool QChar::isPunct(uint ucs4) +bool QChar::isPunct(uint ucs4) Q_DECL_NOTHROW { if (ucs4 > LastValidCodePoint) return false; @@ -769,7 +792,7 @@ bool QChar::isPunct(uint ucs4) Returns \c true if the UCS-4-encoded character specified by \a ucs4 is a symbol (Symbol_* categories); otherwise returns \c false. */ -bool QChar::isSymbol(uint ucs4) +bool QChar::isSymbol(uint ucs4) Q_DECL_NOTHROW { if (ucs4 > LastValidCodePoint) return false; @@ -799,7 +822,7 @@ bool QChar::isSymbol(uint ucs4) /*! \internal */ -bool QT_FASTCALL QChar::isLetter_helper(uint ucs4) +bool QT_FASTCALL QChar::isLetter_helper(uint ucs4) Q_DECL_NOTHROW { if (ucs4 > LastValidCodePoint) return false; @@ -834,7 +857,7 @@ bool QT_FASTCALL QChar::isLetter_helper(uint ucs4) /*! \internal */ -bool QT_FASTCALL QChar::isNumber_helper(uint ucs4) +bool QT_FASTCALL QChar::isNumber_helper(uint ucs4) Q_DECL_NOTHROW { if (ucs4 > LastValidCodePoint) return false; @@ -863,7 +886,7 @@ bool QT_FASTCALL QChar::isNumber_helper(uint ucs4) /*! \internal */ -bool QT_FASTCALL QChar::isLetterOrNumber_helper(uint ucs4) +bool QT_FASTCALL QChar::isLetterOrNumber_helper(uint ucs4) Q_DECL_NOTHROW { if (ucs4 > LastValidCodePoint) return false; @@ -1026,7 +1049,7 @@ bool QT_FASTCALL QChar::isLetterOrNumber_helper(uint ucs4) Returns the numeric value of the digit specified by the UCS-4-encoded character, \a ucs4, or -1 if the character is not a digit. */ -int QChar::digitValue(uint ucs4) +int QChar::digitValue(uint ucs4) Q_DECL_NOTHROW { if (ucs4 > LastValidCodePoint) return -1; @@ -1043,7 +1066,7 @@ int QChar::digitValue(uint ucs4) \overload Returns the category of the UCS-4-encoded character specified by \a ucs4. */ -QChar::Category QChar::category(uint ucs4) +QChar::Category QChar::category(uint ucs4) Q_DECL_NOTHROW { if (ucs4 > LastValidCodePoint) return QChar::Other_NotAssigned; @@ -1060,7 +1083,7 @@ QChar::Category QChar::category(uint ucs4) \overload Returns the direction of the UCS-4-encoded character specified by \a ucs4. */ -QChar::Direction QChar::direction(uint ucs4) +QChar::Direction QChar::direction(uint ucs4) Q_DECL_NOTHROW { if (ucs4 > LastValidCodePoint) return QChar::DirL; @@ -1083,7 +1106,7 @@ QChar::Direction QChar::direction(uint ucs4) character specified by \a ucs4 (needed for certain languages such as Arabic or Syriac). */ -QChar::JoiningType QChar::joiningType(uint ucs4) +QChar::JoiningType QChar::joiningType(uint ucs4) Q_DECL_NOTHROW { if (ucs4 > LastValidCodePoint) return QChar::Joining_None; @@ -1106,7 +1129,7 @@ QChar::JoiningType QChar::joiningType(uint ucs4) Returns information about the joining properties of the UCS-4-encoded character specified by \a ucs4 (needed for certain languages such as Arabic). */ -QChar::Joining QChar::joining(uint ucs4) +QChar::Joining QChar::joining(uint ucs4) Q_DECL_NOTHROW { if (ucs4 > LastValidCodePoint) return QChar::OtherJoining; @@ -1142,7 +1165,7 @@ QChar::Joining QChar::joining(uint ucs4) \sa mirroredChar() */ -bool QChar::hasMirrored(uint ucs4) +bool QChar::hasMirrored(uint ucs4) Q_DECL_NOTHROW { if (ucs4 > LastValidCodePoint) return false; @@ -1224,7 +1247,7 @@ bool QChar::hasMirrored(uint ucs4) \sa hasMirrored() */ -uint QChar::mirroredChar(uint ucs4) +uint QChar::mirroredChar(uint ucs4) Q_DECL_NOTHROW { if (ucs4 > LastValidCodePoint) return ucs4; @@ -1308,7 +1331,7 @@ QString QChar::decomposition(uint ucs4) Returns the tag defining the composition of the UCS-4-encoded character specified by \a ucs4. Returns QChar::NoDecomposition if no decomposition exists. */ -QChar::Decomposition QChar::decompositionTag(uint ucs4) +QChar::Decomposition QChar::decompositionTag(uint ucs4) Q_DECL_NOTHROW { if (ucs4 >= Hangul_SBase && ucs4 < Hangul_SBase + Hangul_SCount) return QChar::Canonical; @@ -1334,7 +1357,7 @@ QChar::Decomposition QChar::decompositionTag(uint ucs4) Returns the combining class for the UCS-4-encoded character specified by \a ucs4, as defined in the Unicode standard. */ -unsigned char QChar::combiningClass(uint ucs4) +unsigned char QChar::combiningClass(uint ucs4) Q_DECL_NOTHROW { if (ucs4 > LastValidCodePoint) return 0; @@ -1355,7 +1378,7 @@ unsigned char QChar::combiningClass(uint ucs4) Returns the Unicode script property value for the character specified in its UCS-4-encoded form as \a ucs4. */ -QChar::Script QChar::script(uint ucs4) +QChar::Script QChar::script(uint ucs4) Q_DECL_NOTHROW { if (ucs4 > LastValidCodePoint) return QChar::Script_Unknown; @@ -1373,7 +1396,7 @@ QChar::Script QChar::script(uint ucs4) Returns the Unicode version that introduced the character specified in its UCS-4-encoded form as \a ucs4. */ -QChar::UnicodeVersion QChar::unicodeVersion(uint ucs4) +QChar::UnicodeVersion QChar::unicodeVersion(uint ucs4) Q_DECL_NOTHROW { if (ucs4 > LastValidCodePoint) return QChar::Unicode_Unassigned; @@ -1383,14 +1406,14 @@ QChar::UnicodeVersion QChar::unicodeVersion(uint ucs4) /*! Returns the most recent supported Unicode version. */ -QChar::UnicodeVersion QChar::currentUnicodeVersion() +QChar::UnicodeVersion QChar::currentUnicodeVersion() Q_DECL_NOTHROW { return UNICODE_DATA_VERSION; } template <typename T> -Q_DECL_CONST_FUNCTION static inline T toLowerCase_helper(T uc) +Q_DECL_CONST_FUNCTION static inline T toLowerCase_helper(T uc) Q_DECL_NOTHROW { const QUnicodeTables::Properties *p = qGetProp(uc); if (p->lowerCaseSpecial) { @@ -1401,7 +1424,7 @@ Q_DECL_CONST_FUNCTION static inline T toLowerCase_helper(T uc) } template <typename T> -Q_DECL_CONST_FUNCTION static inline T toUpperCase_helper(T uc) +Q_DECL_CONST_FUNCTION static inline T toUpperCase_helper(T uc) Q_DECL_NOTHROW { const QUnicodeTables::Properties *p = qGetProp(uc); if (p->upperCaseSpecial) { @@ -1412,7 +1435,7 @@ Q_DECL_CONST_FUNCTION static inline T toUpperCase_helper(T uc) } template <typename T> -Q_DECL_CONST_FUNCTION static inline T toTitleCase_helper(T uc) +Q_DECL_CONST_FUNCTION static inline T toTitleCase_helper(T uc) Q_DECL_NOTHROW { const QUnicodeTables::Properties *p = qGetProp(uc); if (p->titleCaseSpecial) { @@ -1423,7 +1446,7 @@ Q_DECL_CONST_FUNCTION static inline T toTitleCase_helper(T uc) } template <typename T> -Q_DECL_CONST_FUNCTION static inline T toCaseFolded_helper(T uc) +Q_DECL_CONST_FUNCTION static inline T toCaseFolded_helper(T uc) Q_DECL_NOTHROW { const QUnicodeTables::Properties *p = qGetProp(uc); if (p->caseFoldSpecial) { @@ -1446,7 +1469,7 @@ Q_DECL_CONST_FUNCTION static inline T toCaseFolded_helper(T uc) by \a ucs4 if the character is uppercase or titlecase; otherwise returns the character itself. */ -uint QChar::toLower(uint ucs4) +uint QChar::toLower(uint ucs4) Q_DECL_NOTHROW { if (ucs4 > LastValidCodePoint) return ucs4; @@ -1466,7 +1489,7 @@ uint QChar::toLower(uint ucs4) by \a ucs4 if the character is lowercase or titlecase; otherwise returns the character itself. */ -uint QChar::toUpper(uint ucs4) +uint QChar::toUpper(uint ucs4) Q_DECL_NOTHROW { if (ucs4 > LastValidCodePoint) return ucs4; @@ -1486,7 +1509,7 @@ uint QChar::toUpper(uint ucs4) by \a ucs4 if the character is lowercase or uppercase; otherwise returns the character itself. */ -uint QChar::toTitleCase(uint ucs4) +uint QChar::toTitleCase(uint ucs4) Q_DECL_NOTHROW { if (ucs4 > LastValidCodePoint) return ucs4; @@ -1501,7 +1524,7 @@ static inline uint foldCase(const ushort *ch, const ushort *start) return toCaseFolded_helper<uint>(c); } -static inline uint foldCase(uint ch, uint &last) +static inline uint foldCase(uint ch, uint &last) Q_DECL_NOTHROW { uint c = ch; if (QChar(c).isLowSurrogate() && QChar(last).isHighSurrogate()) @@ -1510,7 +1533,7 @@ static inline uint foldCase(uint ch, uint &last) return toCaseFolded_helper<uint>(c); } -static inline ushort foldCase(ushort ch) +static inline ushort foldCase(ushort ch) Q_DECL_NOTHROW { return toCaseFolded_helper<ushort>(ch); } @@ -1527,7 +1550,7 @@ static inline ushort foldCase(ushort ch) Returns the case folded equivalent of the UCS-4-encoded character specified by \a ucs4. For most Unicode characters this is the same as toLower(). */ -uint QChar::toCaseFolded(uint ucs4) +uint QChar::toCaseFolded(uint ucs4) Q_DECL_NOTHROW { if (ucs4 > LastValidCodePoint) return ucs4; |