forked from qt-creator/qt-creator
Squish: Remove OSX specific workaround
Change-Id: I9e43c47c5ef2422d46e10b9f2fd88454b4352c30 Reviewed-by: Robert Loehning <robert.loehning@qt.io>
This commit is contained in:
@@ -344,20 +344,10 @@ def validateSearchResult(expectedCount):
|
|||||||
def invokeContextMenuItem(editorArea, command1, command2 = None):
|
def invokeContextMenuItem(editorArea, command1, command2 = None):
|
||||||
ctxtMenu = openContextMenuOnTextCursorPosition(editorArea)
|
ctxtMenu = openContextMenuOnTextCursorPosition(editorArea)
|
||||||
snooze(1)
|
snooze(1)
|
||||||
if platform.system() == 'Darwin':
|
activateItem(waitForObjectItem(objectMap.realName(ctxtMenu), command1, 2000))
|
||||||
item1 = waitForObjectItem(ctxtMenu, command1)
|
if command2:
|
||||||
subMenu = item1.menu()
|
activateItem(waitForObjectItem("{title='%s' type='QMenu' visible='1' window=%s}"
|
||||||
activateItem(item1)
|
% (command1, objectMap.realName(ctxtMenu)), command2, 2000))
|
||||||
# subMenu could have been triggered by hovering, but closed again by clicking
|
|
||||||
if subMenu and not subMenu.visible:
|
|
||||||
activateItem(item1)
|
|
||||||
if command2:
|
|
||||||
activateItem(subMenu, command2)
|
|
||||||
else:
|
|
||||||
activateItem(waitForObjectItem(objectMap.realName(ctxtMenu), command1, 2000))
|
|
||||||
if command2:
|
|
||||||
activateItem(waitForObjectItem("{title='%s' type='QMenu' visible='1' window=%s}"
|
|
||||||
% (command1, objectMap.realName(ctxtMenu)), command2, 2000))
|
|
||||||
|
|
||||||
# this function invokes the "Find Usages" item from context menu
|
# this function invokes the "Find Usages" item from context menu
|
||||||
# param editor an editor object
|
# param editor an editor object
|
||||||
|
Reference in New Issue
Block a user