From: Jiang Jiang Date: Wed, 30 May 2012 07:50:34 +0000 (+0200) Subject: Fix lineHeight test for QQuickText X-Git-Url: http://git.silmor.de/gitweb/?a=commitdiff_plain;h=3beebd602b2d6074a745d797de64f04a13093456;p=konrad%2Fqtdeclarative.git Fix lineHeight test for QQuickText qCeil() should be used to wrap the result of height() instead of the end result after multiply with 1.5. Change-Id: Ia69d63ad4a9aa9c48365b8c3b994708bbbdab7c5 Reviewed-by: Andrew den Exter --- diff --git a/tests/auto/quick/qquicktext/tst_qquicktext.cpp b/tests/auto/quick/qquicktext/tst_qquicktext.cpp index d9395ca..28eed57 100644 --- a/tests/auto/quick/qquicktext/tst_qquicktext.cpp +++ b/tests/auto/quick/qquicktext/tst_qquicktext.cpp @@ -1602,7 +1602,7 @@ void tst_qquicktext::lineHeight() qreal h = myText->height(); myText->setLineHeight(1.5); - QCOMPARE(myText->height(), qreal(qCeil(h * 1.5))); + QCOMPARE(myText->height(), qreal(qCeil(h)) * 1.5); myText->setLineHeightMode(QQuickText::FixedHeight); myText->setLineHeight(20);