From c98bd0ae192cac1254b2c98b497002e6256f0fbc Mon Sep 17 00:00:00 2001 From: Yann Bodson Date: Fri, 28 Jan 2011 17:48:04 +1000 Subject: Fix lineHeight autotests. --- tests/auto/declarative/qdeclarativetext/tst_qdeclarativetext.cpp | 8 ++++---- 1 file 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 amet, 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() -- cgit v0.12