diff options
author | Jiang Jiang <jiang.jiang@nokia.com> | 2012-05-30 09:50:34 +0200 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-05-30 13:30:06 +0200 |
commit | 3beebd602b2d6074a745d797de64f04a13093456 (patch) | |
tree | 10ddd98ade78b19738f6485904cebdff54f28ddb | |
parent | ddd6afe066377e8c39a7fac5c7e358bacc4cd84f (diff) |
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 <andrew.den-exter@nokia.com>
-rw-r--r-- | tests/auto/quick/qquicktext/tst_qquicktext.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/auto/quick/qquicktext/tst_qquicktext.cpp b/tests/auto/quick/qquicktext/tst_qquicktext.cpp index d9395ca78d..28eed57a95 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); |