summaryrefslogtreecommitdiffstats
path: root/tests/auto/qmenu
diff options
context:
space:
mode:
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 d7f453e..e467229 100644
--- a/tests/auto/qmenu/tst_qmenu.cpp
+++ b/tests/auto/qmenu/tst_qmenu.cpp
@@ -676,7 +676,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());
}