Commit 44e4c45e authored by Robert Loehning's avatar Robert Loehning Committed by Robert Löhning
Browse files

Squish: Simplify selectFromCombo calls



Done-with: Christian Stenger

Change-Id: Ie9b2691675b12fb4d84f9239358c7db4ab60c431
Reviewed-by: default avatarChristian Stenger <christian.stenger@nokia.com>
parent 6acf123c
......@@ -106,7 +106,7 @@ def createProject_Qt_GUI(path, projectName, qtVersion, checks):
__createProjectSetNameAndPath__(path, projectName, checks)
__chooseTargets__()
selectFromCombo(":scrollArea.Create Build Configurations:_QComboBox_2", "For One Qt Version One Debug And One Release")
selectFromCombo(":scrollArea.Qt Version:_QComboBox", qtVersion.replace(".", "\\."))
selectFromCombo(":scrollArea.Qt Version:_QComboBox", qtVersion)
if checks:
if platform.system() in ('Windows', 'Microsoft'):
path = os.path.abspath(path)
......
......@@ -37,7 +37,7 @@ def prepareBuildSettings(targetCount, currentTarget, setReleaseBuild=True, disab
wait = False
try:
if qtCombo.currentText != defaultQtVersion:
selectFromCombo(qtCombo, defaultQtVersion.replace(".", "\\."))
selectFromCombo(qtCombo, defaultQtVersion)
if setReleaseBuild:
chooseThis = "%s Release" % defaultQtVersion
else:
......
......@@ -54,8 +54,10 @@ def verifyEnabled(objectSpec, expectedState = True):
# param itemName is the item to be selected in the combo box
def selectFromCombo(objectSpec, itemName):
object = verifyEnabled(objectSpec)
mouseClick(object, 5, 5, 0, Qt.LeftButton)
mouseClick(waitForObjectItem(object, itemName), 5, 5, 0, Qt.LeftButton)
if itemName != str(object.currentText):
mouseClick(object, 5, 5, 0, Qt.LeftButton)
mouseClick(waitForObjectItem(object, itemName.replace(".", "\\.")), 5, 5, 0, Qt.LeftButton)
waitFor("str(object.currentText)==itemName", 5000)
def selectFromLocator(filter, itemName = None):
if itemName == None:
......
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