summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWarwick Allison <warwick.allison@nokia.com>2009-08-14 16:56:46 +1000
committerWarwick Allison <warwick.allison@nokia.com>2009-08-14 16:56:46 +1000
commitc57c204a63168e875e513d299bb152c0a1ab0094 (patch)
tree0603881035f17a7ecbce6a6e3c3e5f8f18b2f845
parentc80302a19f43ed1c39675a979762499fc589743a (diff)
Fix MLS test
"sm"+ellipsis (...) is same length as "small" in some fonts
-rw-r--r--tests/auto/qfontmetrics/tst_qfontmetrics.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/auto/qfontmetrics/tst_qfontmetrics.cpp b/tests/auto/qfontmetrics/tst_qfontmetrics.cpp
index 9a743efb5..9ffbc058c 100644
--- a/tests/auto/qfontmetrics/tst_qfontmetrics.cpp
+++ b/tests/auto/qfontmetrics/tst_qfontmetrics.cpp
@@ -218,8 +218,9 @@ void tst_QFontMetrics::elidedMultiLength()
QCOMPARE(fm.elidedText(text1,Qt::ElideRight, width_short), text1_short);
QCOMPARE(fm.elidedText(text1,Qt::ElideRight, width_short - 1), text1_small);
+ // Not even wide enough for "small" - should use ellipsis
QChar ellipsisChar(0x2026);
- QString text1_el = QString::fromLatin1("sm") + ellipsisChar;
+ QString text1_el = QString::fromLatin1("s") + ellipsisChar;
int width_small = fm.width(text1_el);
QCOMPARE(fm.elidedText(text1,Qt::ElideRight, width_small + 1), text1_el);