Make layoutDirection pass with new expose behavior
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 <simo.falt@digia.com> Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
This commit is contained in:
parent
41dedabb01
commit
1983bc9c37
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user