summaryrefslogtreecommitdiffstats
path: root/tests/auto/declarative
diff options
context:
space:
mode:
authorMartin Jones <martin.jones@nokia.com>2011-03-09 01:52:41 (GMT)
committerMartin Jones <martin.jones@nokia.com>2011-03-09 02:04:03 (GMT)
commit0d6ce63ea84b076efbebfae0f6f39f492d8d7bcf (patch)
treefbfdc7cae04be6e6e064f10dc466f266fb84f9c7 /tests/auto/declarative
parentbd528156fe69188957f00bd33fa96b9dd6688820 (diff)
downloadQt-0d6ce63ea84b076efbebfae0f6f39f492d8d7bcf.zip
Qt-0d6ce63ea84b076efbebfae0f6f39f492d8d7bcf.tar.gz
Qt-0d6ce63ea84b076efbebfae0f6f39f492d8d7bcf.tar.bz2
Revert to previous lineHeight behavior.
f47f01fd34d08f6152c9053c0d6928fc359aa0f9 changed the height of the Text to not include the extra spacing at the end of the block. This is different to what QDextDocument does. Revert back to the old behavior. Change-Id: Ie43dea4dd5a0e9ba179f44c246fb834322db11e3 Reviewed-by: Joona Petrell
Diffstat (limited to 'tests/auto/declarative')
-rw-r--r--tests/auto/declarative/qdeclarativetext/tst_qdeclarativetext.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/tests/auto/declarative/qdeclarativetext/tst_qdeclarativetext.cpp b/tests/auto/declarative/qdeclarativetext/tst_qdeclarativetext.cpp
index 9c12a90..c854f86 100644
--- a/tests/auto/declarative/qdeclarativetext/tst_qdeclarativetext.cpp
+++ b/tests/auto/declarative/qdeclarativetext/tst_qdeclarativetext.cpp
@@ -1156,14 +1156,12 @@ void tst_qdeclarativetext::lineHeight()
QVERIFY(myText->lineHeightMode() == QDeclarativeText::ProportionalHeight);
qreal h = myText->height();
- int lc = myText->lineCount();
- qreal lh = myText->height() / lc;
myText->setLineHeight(1.5);
- QVERIFY(qAbs(myText->height() - (((lc-1) * lh * 1.5) + lh)) < 1.0);
+ QVERIFY(myText->height() == h * 1.5);
myText->setLineHeightMode(QDeclarativeText::FixedHeight);
myText->setLineHeight(20);
- QCOMPARE(myText->height(), ((lc-1) * 20.0) + lh);
+ 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::ProportionalHeight);