summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Stenger <christian.stenger@digia.com>2014-01-23 10:56:50 +0100
committerChristian Stenger <christian.stenger@digia.com>2014-01-23 11:17:07 +0100
commite18490b65a591762f85163349345166c86821945 (patch)
treedd8078bf14dd69b565805fd7346761018639794d
parent185a22f0d03ea3deccd94d32a420282f93d6fc0a (diff)
downloadqt-creator-e18490b65a591762f85163349345166c86821945.tar.gz
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: Robert Loehning <robert.loehning@digia.com>
-rw-r--r--tests/system/suite_tools/tst_designer_goto_slot/test.py10
1 files changed, 9 insertions, 1 deletions
diff --git a/tests/system/suite_tools/tst_designer_goto_slot/test.py b/tests/system/suite_tools/tst_designer_goto_slot/test.py
index b661190778..b6d73bdefb 100644
--- a/tests/system/suite_tools/tst_designer_goto_slot/test.py
+++ b/tests/system/suite_tools/tst_designer_goto_slot/test.py
@@ -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"))