Commit 185a22f0 authored by Christian Stenger's avatar Christian Stenger
Browse files

Squish: Avoid crash in tst_designer_autocomplete on Mac



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

Change-Id: Ia017b48db5b6ab816a50504abc05c086fdf65799
Reviewed-by: default avatarRobert Loehning <robert.loehning@digia.com>
parent bbb0becf
......@@ -42,7 +42,14 @@ def main():
if buttonName:
openContextMenu(waitForObject("{container=':*Qt Creator.FormEditorStack_Designer::Internal::FormEditorStack'"
"text='PushButton' type='QPushButton' visible='1'}"), 5, 5, 1)
activateItem(waitForObjectItem("{type='QMenu' unnamed='1' visible='1'}", "Change objectName..."))
# hack for Squish5/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:
activateItem(obj, "Change objectName...")
break
else:
activateItem(waitForObjectItem("{type='QMenu' unnamed='1' visible='1'}", "Change objectName..."))
typeLines(waitForObject(":FormEditorStack_qdesigner_internal::PropertyLineEdit"), buttonName)
else:
# Verify that everything works without ever changing the name
......
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