From: Konstantin Ritt Date: Thu, 26 Apr 2012 16:36:34 +0000 (+0300) Subject: stop ignoring unassigned codepoints X-Git-Tag: 071012110112~1195 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=72c5ca98e539daab86542e53ce8404776d03a63f;p=profile%2Fivi%2Fqtbase.git stop ignoring unassigned codepoints in Unicode 5.1, it was clarified that unassigned codepoints normally should not be excluded from the process; moreover, unassigned codepoints assumed to be starters in decomposition by default Change-Id: Ic4a61ec3759ee62b6843c81045e1d611d0684ead Reviewed-by: Thiago Macieira Reviewed-by: Lars Knoll --- diff --git a/src/corelib/tools/qchar.cpp b/src/corelib/tools/qchar.cpp index 358653a..33b2c0b 100644 --- a/src/corelib/tools/qchar.cpp +++ b/src/corelib/tools/qchar.cpp @@ -1419,8 +1419,7 @@ static void decomposeHelper(QString *str, bool canonical, QChar::UnicodeVersion } } - const QChar::UnicodeVersion v = QChar::unicodeVersion(ucs4); - if (v > version || v == QChar::Unicode_Unassigned) + if (QChar::unicodeVersion(ucs4) > version) continue; const unsigned short *d = decompositionHelper(ucs4, &length, &tag, buffer); @@ -1521,7 +1520,7 @@ static void composeHelper(QString *str, QChar::UnicodeVersion version, int from) } const QUnicodeTables::Properties *p = qGetProp(uc); - if (p->unicodeVersion > version || p->unicodeVersion == QChar::Unicode_Unassigned) { + if (p->unicodeVersion > version) { starter = -1; next = -1; // to prevent i == next lastCombining = 255; // to prevent combining > lastCombining @@ -1597,7 +1596,7 @@ static void canonicalOrderHelper(QString *str, QChar::UnicodeVersion version, in c2 = 0; { const QUnicodeTables::Properties *p = qGetProp(u2); - if (p->unicodeVersion <= version && p->unicodeVersion != QChar::Unicode_Unassigned) + if (p->unicodeVersion <= version) c2 = p->combiningClass; } if (c2 == 0) { @@ -1607,7 +1606,7 @@ static void canonicalOrderHelper(QString *str, QChar::UnicodeVersion version, in if (c1 == 0) { const QUnicodeTables::Properties *p = qGetProp(u1); - if (p->unicodeVersion <= version && p->unicodeVersion != QChar::Unicode_Unassigned) + if (p->unicodeVersion <= version) c1 = p->combiningClass; } diff --git a/src/corelib/tools/qchar.h b/src/corelib/tools/qchar.h index 5d9402a..6711f66 100644 --- a/src/corelib/tools/qchar.h +++ b/src/corelib/tools/qchar.h @@ -190,7 +190,7 @@ public: }; enum UnicodeVersion { - Unicode_Unassigned, // ### Qt 5: assign with some constantly big value + Unicode_Unassigned, Unicode_1_1, Unicode_2_0, Unicode_2_1_2,