aboutsummaryrefslogtreecommitdiffstats
path: root/tests/system/suite_tools/tst_designer_autocomplete/test.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/system/suite_tools/tst_designer_autocomplete/test.py')
-rw-r--r--tests/system/suite_tools/tst_designer_autocomplete/test.py15
1 files changed, 11 insertions, 4 deletions
diff --git a/tests/system/suite_tools/tst_designer_autocomplete/test.py b/tests/system/suite_tools/tst_designer_autocomplete/test.py
index f57a433899..25ebf5865d 100644
--- a/tests/system/suite_tools/tst_designer_autocomplete/test.py
+++ b/tests/system/suite_tools/tst_designer_autocomplete/test.py
@@ -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)