src/gui/text/qtextengine.cpp
branchRCL_3
changeset 8 3f74d0d4af4c
parent 4 3b1da2848fc7
child 14 c0432d11811c
--- a/src/gui/text/qtextengine.cpp	Mon Mar 15 12:43:09 2010 +0200
+++ b/src/gui/text/qtextengine.cpp	Thu Apr 08 14:19:33 2010 +0300
@@ -81,7 +81,7 @@
     void generate(int start, int length, QFont::Capitalization caps)
     {
         if ((int)caps == (int)QFont::SmallCaps)
-            generateScriptItemsSmallCaps(m_string.utf16(), start, length);
+            generateScriptItemsSmallCaps(reinterpret_cast<const ushort *>(m_string.unicode()), start, length);
         else if(caps == QFont::Capitalize)
             generateScriptItemsCapitalize(start, length);
         else if(caps != QFont::MixedCase) {
@@ -1434,9 +1434,7 @@
         layoutData->hasBidi = bidiItemize(const_cast<QTextEngine *>(this), analysis, control);
     }
 
-    const ushort *unicode = layoutData->string.utf16();
-    // correctly assign script, isTab and isObject to the script analysis
-    const ushort *uc = unicode;
+    const ushort *uc = reinterpret_cast<const ushort *>(layoutData->string.unicode());
     const ushort *e = uc + length;
     int lastScript = QUnicodeTables::Common;
     while (uc < e) {