Commit e2b8ef45 authored by Christian Stenger's avatar Christian Stenger

Squish: Avoid Squish crash in tst_rename_file on Mac

Change-Id: I51b16970504d85eed63cf0ddd7b0ff07b6226273
Reviewed-by: default avatarRobert Loehning <robert.loehning@digia.com>
parent 1b7de8c3
......@@ -82,10 +82,17 @@ def renameFile(projectDir, proFile, branch, oldname, newname):
openItemContextMenu(treeview, itemText, 5, 5, 0)
except:
openItemContextMenu(treeview, addBranchWildcardToRoot(itemText), 5, 5, 0)
if oldname.endswith(".qrc"):
activateItem(waitForObjectItem(":Qt Creator.Project.Menu.Folder_QMenu", "Rename File"))
# hack for Squish5/Qt5.2 problems of handling menus on Mac - remove asap
if platform.system() == 'Darwin':
item = "Rename..."
if oldname.endswith(".qrc"):
item = "Rename File"
waitFor("macHackActivateContextMenuItem(item)", 5000)
else:
activateItem(waitForObjectItem(":Qt Creator.Project.Menu.File_QMenu", "Rename..."))
if oldname.endswith(".qrc"):
activateItem(waitForObjectItem(":Qt Creator.Project.Menu.Folder_QMenu", "Rename File"))
else:
activateItem(waitForObjectItem(":Qt Creator.Project.Menu.File_QMenu", "Rename..."))
type(waitForObject(":Qt Creator_Utils::NavigationTreeView::QExpandingLineEdit"), newname)
type(waitForObject(":Qt Creator_Utils::NavigationTreeView::QExpandingLineEdit"), "<Return>")
test.verify(waitFor("os.path.exists(newFilePath)", 1000),
......
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