diff options
author | Yann Bodson <yann.bodson@nokia.com> | 2011-01-28 07:48:04 (GMT) |
---|---|---|
committer | Yann Bodson <yann.bodson@nokia.com> | 2011-01-28 07:48:04 (GMT) |
commit | c98bd0ae192cac1254b2c98b497002e6256f0fbc (patch) | |
tree | 7ef6d5b700d92f712800e52c91d76cfb3b89d965 /tests/auto/declarative/qdeclarativetext | |
parent | 74329f77d567e0b7e8cd4cab2ff6ce3f2b8892ad (diff) | |
download | Qt-c98bd0ae192cac1254b2c98b497002e6256f0fbc.zip Qt-c98bd0ae192cac1254b2c98b497002e6256f0fbc.tar.gz Qt-c98bd0ae192cac1254b2c98b497002e6256f0fbc.tar.bz2 |
Fix lineHeight autotests.
Diffstat (limited to 'tests/auto/declarative/qdeclarativetext')
-rw-r--r-- | tests/auto/declarative/qdeclarativetext/tst_qdeclarativetext.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/auto/declarative/qdeclarativetext/tst_qdeclarativetext.cpp b/tests/auto/declarative/qdeclarativetext/tst_qdeclarativetext.cpp index b96fbff..8111cd2 100644 --- a/tests/auto/declarative/qdeclarativetext/tst_qdeclarativetext.cpp +++ b/tests/auto/declarative/qdeclarativetext/tst_qdeclarativetext.cpp @@ -1099,19 +1099,19 @@ void tst_qdeclarativetext::lineHeight() myText->setLineHeightMode(QDeclarativeText::PixelHeight); myText->setLineHeight(20); - QCOMPARE(myText->height(), 120.0); + QCOMPARE(myText->height(), myText->lineCount() * 20.0); myText->setText("Lorem ipsum sit <b>amet</b>, consectetur adipiscing elit. Integer felis nisl, varius in pretium nec, venenatis non erat. Proin lobortis interdum dictum."); myText->setLineHeightMode(QDeclarativeText::MultiplyHeight); myText->setLineHeight(1); qreal h2 = myText->height(); - myText->setLineHeight(1.25); - QVERIFY(myText->height() == h2 * 1.25); + myText->setLineHeight(2.0); + QVERIFY(myText->height() == h2 * 2.0); myText->setLineHeightMode(QDeclarativeText::PixelHeight); myText->setLineHeight(10); - QCOMPARE(myText->height(), 60.0); + QCOMPARE(myText->height(), myText->lineCount() * 10.0); } void tst_qdeclarativetext::implicitSize_data() |