summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMartin Jones <martin.jones@nokia.com>2011-03-21 06:27:45 (GMT)
committerMartin Jones <martin.jones@nokia.com>2011-03-21 22:34:49 (GMT)
commitb888c9cca5ba2994344533c7602d22e1bc8e5db3 (patch)
tree576508bb9cf7865ea31fc8c2b9d5a5d4d0c42f28 /src
parent521a13e3f0a66c31bbf95304de3c7384042a39aa (diff)
downloadQt-b888c9cca5ba2994344533c7602d22e1bc8e5db3.zip
Qt-b888c9cca5ba2994344533c7602d22e1bc8e5db3.tar.gz
Qt-b888c9cca5ba2994344533c7602d22e1bc8e5db3.tar.bz2
Text bounding rect calculated incorrectly if non-top aligned.
QRect::setY() affects the size of the rectangle, so the height of the bounding rect was too small. Use moveTop() instead, which does not affect the size of the rectangle. Change-Id: If41ba6a28c9a7370f054dab20995a198f822ae2b Task-number: QTBUG-18194 Reviewed-by: Bea Lam
Diffstat (limited to 'src')
-rw-r--r--src/declarative/graphicsitems/qdeclarativetext.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/declarative/graphicsitems/qdeclarativetext.cpp b/src/declarative/graphicsitems/qdeclarativetext.cpp
index fdc1a71..720692c 100644
--- a/src/declarative/graphicsitems/qdeclarativetext.cpp
+++ b/src/declarative/graphicsitems/qdeclarativetext.cpp
@@ -1416,10 +1416,10 @@ QRectF QDeclarativeText::boundingRect() const
case AlignTop:
break;
case AlignBottom:
- rect.setY(h - rect.height());
+ rect.moveTop(h - rect.height());
break;
case AlignVCenter:
- rect.setY((h - rect.height()) / 2);
+ rect.moveTop((h - rect.height()) / 2);
break;
}