Squish: Stabilize invoking context menu items on Mac

Change-Id: I64ed356b6120c38d51c646ae409bbbc3a4fe9e8e
Reviewed-by: Robert Loehning <robert.loehning@digia.com>
This commit is contained in:
Christian Stenger
2013-05-03 10:31:00 +02:00
parent e0b7cd6b03
commit edf8b4a59b
+2
View File
@@ -47,6 +47,8 @@ def menuVisibleAtEditor(editor, menuInList):
menuInList[0] = None
try:
menu = waitForObject("{type='QMenu' unnamed='1' visible='1'}", 500)
if platform.system() == 'Darwin':
menu.activateWindow()
success = menu.visible and widgetContainsPoint(editor, menu.mapToGlobal(QPoint(0, 0)))
if success:
menuInList[0] = menu