diff options
author | Michael Brasser <michael.brasser@nokia.com> | 2010-07-20 02:26:13 (GMT) |
---|---|---|
committer | Michael Brasser <michael.brasser@nokia.com> | 2010-07-20 02:26:13 (GMT) |
commit | 6c3cf7e2c5868bc77ffa66059889eda3132531b3 (patch) | |
tree | e82be2bbef65d4fcd0a505793c8eaae24a21d97f /tests/auto/declarative/qdeclarativetext | |
parent | b2f90dedbeac285338af07fbffaec97ceaf0876f (diff) | |
download | Qt-6c3cf7e2c5868bc77ffa66059889eda3132531b3.zip Qt-6c3cf7e2c5868bc77ffa66059889eda3132531b3.tar.gz Qt-6c3cf7e2c5868bc77ffa66059889eda3132531b3.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
Diffstat (limited to 'tests/auto/declarative/qdeclarativetext')
-rw-r--r-- | tests/auto/declarative/qdeclarativetext/tst_qdeclarativetext.cpp | 1 |
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 80198eb..53862ec 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 } |