From 1983bc9c374fc8b83f608ecc1e6ce6ef4f54e572 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Morten=20Johan=20S=C3=B8rvig?= Date: Mon, 2 Dec 2013 23:18:00 +0100 Subject: Make layoutDirection pass with new expose behavior MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit A QMenu with no actions gets a size of (0, 0) on OS X. With the new stricter expose event behavior this is considered invalid geometry and the platform plugin won't send an expose event, causing the qWaitForWindowExposed test to fail. Add a menu entry since the layoutDirection test is not really interested in testing the special case of empty menus. Change-Id: I5221dc3f0472ac13edf821df08bacc3a4eb5cd9d Reviewed-by: Simo Fält Reviewed-by: Gunnar Sletta --- tests/auto/widgets/widgets/qmenu/tst_qmenu.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/auto/widgets/widgets/qmenu/tst_qmenu.cpp b/tests/auto/widgets/widgets/qmenu/tst_qmenu.cpp index 7c1bb957d6..ece9026ba2 100644 --- a/tests/auto/widgets/widgets/qmenu/tst_qmenu.cpp +++ b/tests/auto/widgets/widgets/qmenu/tst_qmenu.cpp @@ -570,6 +570,7 @@ void tst_QMenu::layoutDirection() win.setLayoutDirection(Qt::RightToLeft); QMenu menu(&win); + menu.addAction("foo"); menu.show(); QVERIFY(QTest::qWaitForWindowExposed(&menu)); QCOMPARE(menu.layoutDirection(), Qt::RightToLeft); -- cgit v1.2.3