diff options
author | Martin Jones <martin.jones@nokia.com> | 2011-03-09 01:52:41 (GMT) |
---|---|---|
committer | Martin Jones <martin.jones@nokia.com> | 2011-03-09 02:04:03 (GMT) |
commit | 0d6ce63ea84b076efbebfae0f6f39f492d8d7bcf (patch) | |
tree | fbfdc7cae04be6e6e064f10dc466f266fb84f9c7 /tests | |
parent | bd528156fe69188957f00bd33fa96b9dd6688820 (diff) | |
download | Qt-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')
-rw-r--r-- | tests/auto/declarative/qdeclarativetext/tst_qdeclarativetext.cpp | 6 |
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); |