Commit 7901601e authored by Christian Stenger's avatar Christian Stenger
Browse files

Squish: Simplify __selectTreeItemOnBuildAndRun__()



Change-Id: If1bc3f610cd59041fb4e6ce9edd38354f73b141d
Reviewed-by: default avatarRobert Loehning <robert.loehning@theqtcompany.com>
parent 82e319b2
......@@ -217,19 +217,15 @@ def __selectTreeItemOnBuildAndRun__(treeViewOrWidget, itemText, isRegex=False):
test.compare(manual.data().toString(), "Manual", "Verifying label for section")
if isRegex:
pattern = re.compile(itemText)
found = False
for section in [autoDetected, manual]:
for dumpedItem in dumpItems(model, section):
if (isRegex and pattern.match(dumpedItem)
or itemText == dumpedItem):
found = True
item = ".".join([str(section.data().toString()),
dumpedItem.replace(".", "\\.").replace("_", "\\_")])
clickItem(treeViewOrWidget, item, 5, 5, 0, Qt.LeftButton)
break
if found:
break
return found
return True
return False
def __getTargetFromToolTip__(toolTip):
if toolTip == None or not isinstance(toolTip, (str, unicode)):
......
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