summaryrefslogtreecommitdiffstats
path: root/src/corelib/tools/qchar.h
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@nokia.com>2010-05-20 14:36:25 (GMT)
committerThiago Macieira <thiago.macieira@nokia.com>2010-05-20 14:36:25 (GMT)
commite4dc3567af533df2e57425952c4609726515d2cd (patch)
tree72824b5efc9a4d6ed9f099d34404076245e164fa /src/corelib/tools/qchar.h
parenta36e8ca7afd0c15e5ec73bf4ea21464ab89a3662 (diff)
parentdbfedcb31961579499fcb5342ccc42311191bcd4 (diff)
downloadQt-e4dc3567af533df2e57425952c4609726515d2cd.zip
Qt-e4dc3567af533df2e57425952c4609726515d2cd.tar.gz
Qt-e4dc3567af533df2e57425952c4609726515d2cd.tar.bz2
Merge remote branch 'origin/master'
Conflicts: src/gui/dialogs/qnspanelproxy_mac.mm
Diffstat (limited to 'src/corelib/tools/qchar.h')
-rw-r--r--src/corelib/tools/qchar.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/corelib/tools/qchar.h b/src/corelib/tools/qchar.h
index 1432c7f..205f911 100644
--- a/src/corelib/tools/qchar.h
+++ b/src/corelib/tools/qchar.h
@@ -285,6 +285,15 @@ public:
inline void setCell(uchar cell);
inline void setRow(uchar row);
+ static inline bool isHighSurrogate(uint ucs4) {
+ return ((ucs4 & 0xfffffc00) == 0xd800);
+ }
+ static inline bool isLowSurrogate(uint ucs4) {
+ return ((ucs4 & 0xfffffc00) == 0xdc00);
+ }
+ static inline bool requiresSurrogates(uint ucs4) {
+ return (ucs4 >= 0x10000);
+ }
static inline uint surrogateToUcs4(ushort high, ushort low) {
return (uint(high)<<10) + low - 0x35fdc00;
}