Commit 4c39fbb9 authored by Christian Stenger's avatar Christian Stenger

Squish: Fix hack for tst_designer_autocomplete

Change-Id: I17cfa041f42efb71358e11afcaf987e177603175
Reviewed-by: default avatarRobert Loehning <robert.loehning@digia.com>
parent ac9e7aad
......@@ -29,6 +29,16 @@
source("../../shared/qtcreator.py")
def macHackActivateContextMenuItem(item):
for obj in object.topLevelObjects():
try:
if className(obj) == 'QMenu' and obj.visible:
activateItem(waitForObjectItem(obj, item))
return True
except:
pass
return False
def main():
startApplication("qtcreator" + SettingsPath)
if not startedWithoutPluginError():
......@@ -44,10 +54,7 @@ def main():
"text='PushButton' type='QPushButton' visible='1'}"), 5, 5, 1)
# 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
waitFor("macHackActivateContextMenuItem('Change objectName...')", 6000)
else:
activateItem(waitForObjectItem("{type='QMenu' unnamed='1' visible='1'}", "Change objectName..."))
typeLines(waitForObject(":FormEditorStack_qdesigner_internal::PropertyLineEdit"), buttonName)
......
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