Commit e18490b6 authored by Christian Stenger's avatar Christian Stenger
Browse files

Squish: Avoid crash in tst_designer_goto_slot on Mac



Again this is related to Squish 5 having problems handling menus
on Qt5.2 built applications.

Change-Id: Ie256b2d93259baaf86beaa1a5d9fbed2248ac2ef
Reviewed-by: default avatarRobert Loehning <robert.loehning@digia.com>
parent 185a22f0
......@@ -47,7 +47,15 @@ def main():
for con in connections:
selectFromLocator("mainwindow.ui")
openContextMenu(waitForObject(con[0]), 5, 5, 0)
activateItem(waitForObjectItem("{type='QMenu' unnamed='1' visible='1'}", "Go to slot..."))
# hack for Squish 5/Qt5.2 problems of handling menus on Mac - remove asap
if platform.system() == 'Darwin':
for obj in object.topLevelObjects():
if (className(obj) == 'QMenu' and obj.visible
and widgetContainsPoint(waitForObject(con[0]), obj.mapToGlobal(QPoint(0, 0)))):
activateItem(obj, "Go to slot...")
break
else:
activateItem(waitForObjectItem("{type='QMenu' unnamed='1' visible='1'}", "Go to slot..."))
waitForObjectItem(":Select signal.signalList_QTreeWidget", con[1])
clickItem(":Select signal.signalList_QTreeWidget", con[1], 5, 5, 0, Qt.LeftButton)
clickButton(waitForObject(":Go to slot.OK_QPushButton"))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment