summaryrefslogtreecommitdiffstats
path: root/tests/auto/qmenu
diff options
context:
space:
mode:
authorJoerg Bornemann <joerg.bornemann@nokia.com>2009-09-22 09:45:22 (GMT)
committerJoerg Bornemann <joerg.bornemann@nokia.com>2009-09-22 09:51:10 (GMT)
commitf74dd380f30306bb2cf93ef61bb35dc8db045a11 (patch)
tree25d613b8227e6b8f7328e3c696f0128fa394ab7e /tests/auto/qmenu
parentd14fd301314bcceaf2594a5a18f6d20894c1d353 (diff)
downloadQt-f74dd380f30306bb2cf93ef61bb35dc8db045a11.zip
Qt-f74dd380f30306bb2cf93ef61bb35dc8db045a11.tar.gz
Qt-f74dd380f30306bb2cf93ef61bb35dc8db045a11.tar.bz2
fix tst_QMenu::task242454_sizeHint for Windows mobile
QMenu actually doesn't use QFontMetrics::width to calculate its bounding rect but QFontMetrics::boundingRect. That's why this test failed on Windows CE. Reviewed-by: thierry
Diffstat (limited to 'tests/auto/qmenu')
-rw-r--r--tests/auto/qmenu/tst_qmenu.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/auto/qmenu/tst_qmenu.cpp b/tests/auto/qmenu/tst_qmenu.cpp
index 174d1d7..abf8246 100644
--- a/tests/auto/qmenu/tst_qmenu.cpp
+++ b/tests/auto/qmenu/tst_qmenu.cpp
@@ -658,7 +658,7 @@ void tst_QMenu::task242454_sizeHint()
QMenu menu;
QString s = QLatin1String("foo\nfoo\nfoo\nfoo");
menu.addAction(s);
- QVERIFY(menu.sizeHint().width() > menu.fontMetrics().width(s));
+ QVERIFY(menu.sizeHint().width() > menu.fontMetrics().boundingRect(QRect(), Qt::TextSingleLine, s).width());
}