diff options
author | Konstantin Ritt <ritt.ks@gmail.com> | 2014-01-26 02:42:37 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-01-29 23:19:47 +0100 |
commit | b80fcbdba62ec2324fa9ad29cbc5ac1d9a9fe8a2 (patch) | |
tree | 97a78ec35d3e66e0f2539490d8e112322adde7ce /src/corelib/tools/qstring.h | |
parent | b04d87b2263fd5d9b2b57799098a2eb5a3c91dfc (diff) |
Introduce QChar::JoiningType enum and QChar::joiningType() method
This aimed to disctinct joining types "L", "T", and "U" from just "U".
Unicode 6.3.0 has introduced a character with joining type "L" and
Unicode 7.0 will add a few more characters of joining type "L", so
we'll have to deal with it anyways.
[ChangeLog][QtCore][QChar] Added JoiningType enum and joiningType()
method that deprecates the old QChar::Joining enum and joining() method.
Change-Id: I4be3a3f745d944e689feb9b62d4ca86d1cf371b0
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib/tools/qstring.h')
-rw-r--r-- | src/corelib/tools/qstring.h | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/corelib/tools/qstring.h b/src/corelib/tools/qstring.h index 01ddf669f5..4432759b03 100644 --- a/src/corelib/tools/qstring.h +++ b/src/corelib/tools/qstring.h @@ -908,7 +908,17 @@ public: QChar::Category category() const { return QChar(*this).category(); } QChar::Direction direction() const { return QChar(*this).direction(); } - QChar::Joining joining() const { return QChar(*this).joining(); } + QChar::JoiningType joiningType() const { return QChar(*this).joiningType(); } +#if QT_DEPRECATED_SINCE(5, 3) + QT_DEPRECATED QChar::Joining joining() const { + switch (QChar(*this).joiningType()) { + case QChar::Joining_Causing: return QChar::Center; + case QChar::Joining_Dual: return QChar::Dual; + case QChar::Joining_Right: return QChar::Right; + default: return QChar::OtherJoining; + } + } +#endif bool hasMirrored() const { return QChar(*this).hasMirrored(); } QChar mirroredChar() const { return QChar(*this).mirroredChar(); } QString decomposition() const { return QChar(*this).decomposition(); } |