summaryrefslogtreecommitdiffstats
path: root/tests/auto
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto')
-rw-r--r--tests/auto/declarative/qdeclarativetext/tst_qdeclarativetext.cpp8
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()