summaryrefslogtreecommitdiffstats
path: root/src/gui/text/qtextengine_mac.cpp
diff options
context:
space:
mode:
authorSarah Smith <sarah.j.smith@nokia.com>2009-10-20 01:53:30 (GMT)
committerSarah Smith <sarah.j.smith@nokia.com>2009-10-20 01:53:30 (GMT)
commit420be4ee3d98c093c71cc840192138da6b5e61d2 (patch)
tree9debab52db05f930d2c72095eae0953a320a2816 /src/gui/text/qtextengine_mac.cpp
parentdfd6221d960ec8c563a687684000c3a9c4f58079 (diff)
downloadQt-420be4ee3d98c093c71cc840192138da6b5e61d2.zip
Qt-420be4ee3d98c093c71cc840192138da6b5e61d2.tar.gz
Qt-420be4ee3d98c093c71cc840192138da6b5e61d2.tar.bz2
Fix bug QTBUG-4848
Make the shapeText function return numGlyphs properly - its not always the same as length of string. Task-number: QTBUG-4848 Reviewed-by: Rhys Weatherley
Diffstat (limited to 'src/gui/text/qtextengine_mac.cpp')
-rw-r--r--src/gui/text/qtextengine_mac.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/gui/text/qtextengine_mac.cpp b/src/gui/text/qtextengine_mac.cpp
index 4f20094..e101830 100644
--- a/src/gui/text/qtextengine_mac.cpp
+++ b/src/gui/text/qtextengine_mac.cpp
@@ -50,7 +50,6 @@ static void heuristicSetGlyphAttributes(const QChar *uc, int length, QGlyphLayou
{
// ### zeroWidth and justification are missing here!!!!!
- Q_ASSERT(num_glyphs <= length);
Q_UNUSED(num_glyphs);
// qDebug("QScriptEngine::heuristicSetGlyphAttributes, num_glyphs=%d", item->num_glyphs);
@@ -596,7 +595,7 @@ void QTextEngine::shapeTextMac(int item) const
}
while (true) {
- ensureSpace(num_glyphs);
+ ensureSpace(num_glyphs);
num_glyphs = layoutData->glyphLayout.numGlyphs - layoutData->used;
QGlyphLayout g = availableGlyphs(&si);
@@ -611,9 +610,9 @@ void QTextEngine::shapeTextMac(int item) const
log_clusters,
attributes())) {
- heuristicSetGlyphAttributes(str, len, &g, log_clusters, num_glyphs);
- break;
- }
+ heuristicSetGlyphAttributes(str, len, &g, log_clusters, num_glyphs);
+ break;
+ }
}
si.num_glyphs = num_glyphs;