summaryrefslogtreecommitdiffstats
path: root/src/gui/text/qfontengine_qpf.cpp
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2011-09-20 10:13:30 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2011-09-20 10:13:30 (GMT)
commit2d1063d31626559ee2539ac2c4a6c2cdda0d224b (patch)
treeb9f1490bacd05aea265783bfb5d9e40fe6b2b0dc /src/gui/text/qfontengine_qpf.cpp
parentfde1488aa7476eba915fbac958c56664df8ecf82 (diff)
parent03645fccea8f2bf997ed4191d7a67a0e93a977d6 (diff)
downloadQt-2d1063d31626559ee2539ac2c4a6c2cdda0d224b.zip
Qt-2d1063d31626559ee2539ac2c4a6c2cdda0d224b.tar.gz
Qt-2d1063d31626559ee2539ac2c4a6c2cdda0d224b.tar.bz2
Merge branch 'master' of git://scm.dev.nokia.troll.no/qt/qt-symbian-team
* 'master' of git://scm.dev.nokia.troll.no/qt/qt-symbian-team: (86 commits) Fixed automatic plugin path resolving for predefined Qt plugins. symbian bearer: fix tst_qnetworksession test failures Resolve a number of compilation issues with INTEGRITY Fix compile issue when building with QT_NO_CONCURRENT and QT_NO_FUTURE Update changelog for Qt 4.8 QGraphicsWidget::setLayoutDirection doesn't propagate to new children Update changelog for Qt 4.8 Prevent unnecessary graphics item updates when graphics effect changes. Updated change-log for 4.8 Update changes file for 4.8.0 Update changelog for Qt 4.8 Use more widely supported Unicode character representation Release font engine refcount when done using it in QTextEngine My changes for 4.8.0 minor docu fixes Fix - QGraphicsTextItem in a tab of QTabWidget cannot get focus Mingw compile error src/gui/accessible/qaccessible_win.cpp Updated Changelog My 4.8.0 changes. My 4.8.0 changes ...
Diffstat (limited to 'src/gui/text/qfontengine_qpf.cpp')
-rw-r--r--src/gui/text/qfontengine_qpf.cpp13
1 files changed, 5 insertions, 8 deletions
diff --git a/src/gui/text/qfontengine_qpf.cpp b/src/gui/text/qfontengine_qpf.cpp
index 30a1623..3db5ce1 100644
--- a/src/gui/text/qfontengine_qpf.cpp
+++ b/src/gui/text/qfontengine_qpf.cpp
@@ -278,15 +278,12 @@ QList<QByteArray> QFontEngineQPF::cleanUpAfterClientCrash(const QList<int> &cras
static inline unsigned int getChar(const QChar *str, int &i, const int len)
{
- unsigned int uc = str[i].unicode();
- if (uc >= 0xd800 && uc < 0xdc00 && i < len-1) {
- uint low = str[i+1].unicode();
- if (low >= 0xdc00 && low < 0xe000) {
- uc = (uc - 0xd800)*0x400 + (low - 0xdc00) + 0x10000;
- ++i;
- }
+ uint ucs4 = str[i].unicode();
+ if (str[i].isHighSurrogate() && i < len-1 && str[i+1].isLowSurrogate()) {
+ ++i;
+ ucs4 = QChar::surrogateToUcs4(ucs4, str[i].unicode());
}
- return uc;
+ return ucs4;
}
#ifdef QT_FONTS_ARE_RESOURCES
QFontEngineQPF::QFontEngineQPF(const QFontDef &def, const uchar *bytes, int size)