forked from qt-creator/qt-creator
Squish: Avoid Squish crash on Mac
Squish 5.0.1 has problems handling special locations of menus on Mac using Qt5.2. Change-Id: I9acc6d0f63e00815ff9ab532cb56a8ca5bb69d6a Reviewed-by: Robert Loehning <robert.loehning@digia.com>
This commit is contained in:
@@ -228,6 +228,14 @@ def invokeMenuItem(menu, item, *subItems):
|
||||
waitForObject(":Qt Creator.QtCreator.MenuBar_QMenuBar", 2000)
|
||||
except:
|
||||
nativeMouseClick(waitForObject(":Qt Creator_Core::Internal::MainWindow", 1000), 20, 20, 0, Qt.LeftButton)
|
||||
# HACK to avoid squish crash using Qt5.2 on Squish 5.0.1 - remove asap
|
||||
if platform.system() == "Darwin" and not isQt4Build:
|
||||
if menu == "Tools" and item == "Options...":
|
||||
nativeType("<Command+,>")
|
||||
return
|
||||
if menu == "File" and item == "Exit":
|
||||
nativeType("<Command+q>")
|
||||
return
|
||||
menuObject = waitForObjectItem(":Qt Creator.QtCreator.MenuBar_QMenuBar", menu)
|
||||
waitFor("menuObject.visible", 1000)
|
||||
activateItem(menuObject)
|
||||
|
Reference in New Issue
Block a user