diff options
author | Frederik Gladhorn <frederik.gladhorn@digia.com> | 2013-01-07 15:18:16 +0100 |
---|---|---|
committer | Frederik Gladhorn <frederik.gladhorn@digia.com> | 2013-01-07 15:18:16 +0100 |
commit | cdf13ce286b14273e1e29c5bb02cbc880f31b786 (patch) | |
tree | 10733cb3fb35647b19cfd15ab158f56b1cb550e1 /src/gui/text | |
parent | 21d607c81af0cd285e9bb3869ac3cd18358f1c8f (diff) | |
parent | a8321f21fb82714771b4717c99dd475f2c74649e (diff) |
Merge branch 'stable' into dev
Conflicts:
tests/auto/widgets/graphicsview/qgraphicsscene/tst_qgraphicsscene.cpp
Change-Id: I6b8d505fc22f052c307ca27f58f7d16f98965f47
Diffstat (limited to 'src/gui/text')
-rw-r--r-- | src/gui/text/qtextengine.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/gui/text/qtextengine.cpp b/src/gui/text/qtextengine.cpp index 6a749cfe84..bf83b8f862 100644 --- a/src/gui/text/qtextengine.cpp +++ b/src/gui/text/qtextengine.cpp @@ -1853,7 +1853,7 @@ void QTextEngine::justify(const QScriptLine &line) itemize(); if (!forceJustification) { - int end = line.from + (int)line.length; + int end = line.from + (int)line.length + line.trailingSpaces; if (end == layoutData->string.length()) return; // no justification at end of paragraph if (end && layoutData->items[findItem(end-1)].analysis.flags == QScriptAnalysis::LineOrParagraphSeparator) @@ -1908,6 +1908,8 @@ void QTextEngine::justify(const QScriptLine &line) int gs = log_clusters[start]; int ge = (end == length(firstItem+i) ? si.num_glyphs : log_clusters[end]); + Q_ASSERT(ge <= si.num_glyphs); + const QGlyphLayout g = shapedGlyphs(&si); for (int i = gs; i < ge; ++i) { |