summaryrefslogtreecommitdiffstats
path: root/src/gui/text/qtextlayout.cpp
diff options
context:
space:
mode:
authorMorten Engvoldsen <morten.engvoldsen@nokia.com>2010-05-31 11:47:30 (GMT)
committerMorten Engvoldsen <morten.engvoldsen@nokia.com>2010-05-31 11:47:30 (GMT)
commit8f9ca0b3c06b6003c2a956784742d17fdb3f1af5 (patch)
tree148db5e8a8209ecd9ee2f63840e730d52d8fcf3c /src/gui/text/qtextlayout.cpp
parent098eec2b9ba7218f1b595743476b73b61069d701 (diff)
parentb2244174dc4e1858954d7e21cf66bd010d7a8cb4 (diff)
downloadQt-8f9ca0b3c06b6003c2a956784742d17fdb3f1af5.zip
Qt-8f9ca0b3c06b6003c2a956784742d17fdb3f1af5.tar.gz
Qt-8f9ca0b3c06b6003c2a956784742d17fdb3f1af5.tar.bz2
Merge branch '4.7' of git@scm.dev.nokia.troll.no:qt/oslo-staging-2 into 4.7
Diffstat (limited to 'src/gui/text/qtextlayout.cpp')
-rw-r--r--src/gui/text/qtextlayout.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gui/text/qtextlayout.cpp b/src/gui/text/qtextlayout.cpp
index ce7915d..3f67408 100644
--- a/src/gui/text/qtextlayout.cpp
+++ b/src/gui/text/qtextlayout.cpp
@@ -858,7 +858,8 @@ QRectF QTextLayout::boundingRect() const
const QScriptLine &si = d->lines[i];
xmin = qMin(xmin, si.x);
ymin = qMin(ymin, si.y);
- xmax = qMax(xmax, si.x+qMax(si.width, si.textWidth));
+ QFixed lineWidth = si.width < QFIXED_MAX ? qMax(si.width, si.textWidth) : si.textWidth;
+ xmax = qMax(xmax, si.x+lineWidth);
// ### shouldn't the ascent be used in ymin???
ymax = qMax(ymax, si.y+si.height());
}