Commit edf75577 authored by Christian Stenger's avatar Christian Stenger

Squish: Fix and improve __selectQtVersionDesktop__

Change-Id: I05e0038f8baf134e6d01d829bd52812b9128dd60
Reviewed-by: default avatarRobert Loehning <robert.loehning@digia.com>
parent 484bacdd
......@@ -228,17 +228,6 @@ def __configureCustomExecutable__(projectName, port, mkspec, qmakeVersion):
__invokeAddCustomExecutable__(startAUT, args)
return True
# function that retrieves a specific child object by its class
# this is sometimes the best way to avoid using waitForObject() on objects that
# occur more than once - but could easily be found by using a compound object
# (e.g. search for Utils::PathChooser instead of Utils::FancyLineEdit and get the child)
def getChildByClass(parent, classToSearchFor, occurence=1):
children = [child for child in object.children(parent) if className(child) == classToSearchFor]
if len(children) < occurence:
return None
else:
return children[occurence - 1]
# get the Squish path that is needed to successfully hook into the compiled app
def getSquishPath(mkspec, qmakev):
# assuming major and minor version will be enough
......
......@@ -161,10 +161,17 @@ def __createProjectHandleQtQuickSelection__(qtQuickVersion, controlsVersion):
def __selectQtVersionDesktop__(checks, available=None):
checkedTargets = __chooseTargets__(Targets.desktopTargetClasses(), available)
if checks:
cbObject = ("{type='QCheckBox' text='%s' unnamed='1' visible='1' "
"container={type='Utils::DetailsWidget' visible='1' unnamed='1'}}")
verifyChecked(cbObject % "Debug")
verifyChecked(cbObject % "Release")
for target in checkedTargets:
detailsWidget = waitForObject("{type='Utils::DetailsWidget' unnamed='1' visible='1' "
"summaryText='%s'}" % Targets.getStringForTarget(target))
detailsButton = getChildByClass(detailsWidget, "Utils::DetailsButton")
if test.verify(detailsButton != None, "Verifying if 'Details' button could be found"):
clickButton(detailsButton)
cbObject = ("{type='QCheckBox' text='%s' unnamed='1' visible='1' "
"container=%s}")
verifyChecked(cbObject % ("Debug", objectMap.realName(detailsWidget)))
verifyChecked(cbObject % ("Release", objectMap.realName(detailsWidget)))
clickButton(detailsButton)
clickButton(waitForObject(":Next_QPushButton"))
return checkedTargets
......
......@@ -640,3 +640,14 @@ def openVcsLog():
else:
activateItem(waitForObjectItem("{type='QMenu' unnamed='1' visible='1'}", "Version Control"))
ensureChecked(waitForObject(":Qt Creator_VersionControl_Core::Internal::OutputPaneToggleButton"))
# function that retrieves a specific child object by its class
# this is sometimes the best way to avoid using waitForObject() on objects that
# occur more than once - but could easily be found by using a compound object
# (e.g. search for Utils::PathChooser instead of Utils::FancyLineEdit and get the child)
def getChildByClass(parent, classToSearchFor, occurrence=1):
children = [child for child in object.children(parent) if className(child) == classToSearchFor]
if len(children) < occurrence:
return None
else:
return children[occurrence - 1]
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