summaryrefslogtreecommitdiffstats
path: root/tests/auto/declarative
diff options
context:
space:
mode:
authorMichael Brasser <michael.brasser@nokia.com>2010-07-20 02:26:13 (GMT)
committerToby Tomkins <toby.tomkins@nokia.com>2010-07-26 06:24:12 (GMT)
commit19835bd63a99e1b71b80f68fac249f4d207975ec (patch)
treee37666345642298557c2c533cbb4511eaab63a78 /tests/auto/declarative
parent49d1825841a800ac41d15c5bb6e76628c6bb4859 (diff)
downloadQt-19835bd63a99e1b71b80f68fac249f4d207975ec.zip
Qt-19835bd63a99e1b71b80f68fac249f4d207975ec.tar.gz
Qt-19835bd63a99e1b71b80f68fac249f4d207975ec.tar.bz2
Ensure the boundingRect() of Text is correctly calculated.
We need to create our cached image in boundingRect() if it doesn't already exist, to prevents painting errors. Reviewed-by: Warwick Allison (cherry picked from commit 6c3cf7e2c5868bc77ffa66059889eda3132531b3)
Diffstat (limited to 'tests/auto/declarative')
-rw-r--r--tests/auto/declarative/qdeclarativetext/tst_qdeclarativetext.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/tests/auto/declarative/qdeclarativetext/tst_qdeclarativetext.cpp b/tests/auto/declarative/qdeclarativetext/tst_qdeclarativetext.cpp
index a1d9f02..821394d 100644
--- a/tests/auto/declarative/qdeclarativetext/tst_qdeclarativetext.cpp
+++ b/tests/auto/declarative/qdeclarativetext/tst_qdeclarativetext.cpp
@@ -246,6 +246,7 @@ void tst_qdeclarativetext::width()
QDeclarativeText *textObject = qobject_cast<QDeclarativeText*>(textComponent.create());
QVERIFY(textObject != 0);
+ QVERIFY(textObject->boundingRect().width() > 0);
QCOMPARE(textObject->width(), qreal(metricWidth));
QVERIFY(textObject->textFormat() == QDeclarativeText::AutoText); // setting text doesn't change format
}