Improve QMenu autotest
The test for keyboard navigation was only checking correct highlighting when a menu item was not activated by the latest key-click. It should also check that no item is highlighted after an item is activated. Change-Id: I443e154be5cdc2def4f12d3f0abab2cc1bc6e4a8 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>bb10
parent
0ad18e18d1
commit
9a9d2e8ba2
|
|
@ -360,9 +360,12 @@ void tst_QMenu::keyboardNavigation()
|
|||
QCOMPARE(menus[expected_menu]->activeAction(), (QAction *)0);
|
||||
} else {
|
||||
QCOMPARE(menus[expected_menu]->activeAction(), builtins[expected_action]);
|
||||
if (expected_highlighted)
|
||||
QCOMPARE(menus[expected_menu]->activeAction(), highlighted);
|
||||
}
|
||||
|
||||
if (expected_highlighted)
|
||||
QCOMPARE(menus[expected_menu]->activeAction(), highlighted);
|
||||
else
|
||||
QCOMPARE(highlighted, (QAction *)0);
|
||||
}
|
||||
|
||||
#ifdef Q_WS_MAC
|
||||
|
|
|
|||
Loading…
Reference in New Issue