Commit be9c7d69 authored by Christian Stenger's avatar Christian Stenger

Squish: Fix triggering items listed under "Recent Files"

UI has changed again, so adapt the test to reflect this.

Change-Id: I5d6bcf2b48b8b625f6086f5a1101041a73d7e329
Reviewed-by: default avatarRobert Loehning <robert.loehning@qt.io>
parent 701ccc5e
......@@ -198,7 +198,7 @@ def invokeMenuItem(menu, item, *subItems):
itemObject = waitForObjectItem(objectMap.realName(menuObject), item)
waitFor("itemObject.enabled", 2000)
activateItem(itemObject)
numberedPrefix = "&?\\d+: "
numberedPrefix = "(&\\d \| )?"
for subItem in subItems:
sub = itemObject.menu()
waitFor("sub.visible", 1000)
......@@ -209,7 +209,7 @@ def invokeMenuItem(menu, item, *subItems):
for i in range(actions.count()):
current = actions.at(i)
nonPrefix = subItem[len(numberedPrefix):]
matcher = re.match("(%s)(.*)" % numberedPrefix, str(current.text))
matcher = re.match("%s(.*)" % numberedPrefix, str(current.text))
if matcher and matcher.group(2) == nonPrefix:
itemObject = current
activateItem(itemObject)
......
......@@ -213,7 +213,7 @@ def main():
recentFile = os.path.join(folder, current)
if recentFile.startswith(home) and platform.system() in ('Linux', 'Darwin'):
recentFile = recentFile.replace(home, "~", 1)
invokeMenuItem("File", "Recent Files", "&?\\d+: %s" % recentFile)
invokeMenuItem("File", "Recent Files", "(&\\d \| )?%s" % recentFile)
editor = getEditorForFileSuffix(current)
display = displayHintForHighlighterDefinition(current, patterns, lPatterns,
addedHighlighterDefinition,
......
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