forked from qt-creator/qt-creator
Squish: Update tst_qtquick_creation
Task-number: QTCREATORBUG-20056 Change-Id: I5a7e239b9c65b32e2bc57dd594cc96bdda94b472 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -273,22 +273,13 @@ def createProject_Qt_Console(path, projectName, checks = True, buildSystem = Non
|
||||
if checks:
|
||||
__verifyFileCreation__(path, expectedFiles)
|
||||
|
||||
def createNewQtQuickApplication(workingDir, projectName = None,
|
||||
def createNewQtQuickApplication(workingDir, projectName=None,
|
||||
targets=Targets.desktopTargetClasses(), minimumQtVersion="5.6",
|
||||
withControls = False, fromWelcome = False, buildSystem = None):
|
||||
if withControls:
|
||||
template = "Qt Quick Application - Swipe"
|
||||
else:
|
||||
template = "Qt Quick Application - Empty"
|
||||
template="Qt Quick Application - Empty", fromWelcome=False,
|
||||
buildSystem=None):
|
||||
available = __createProjectOrFileSelectType__(" Application", template, fromWelcome)
|
||||
projectName = __createProjectSetNameAndPath__(workingDir, projectName)
|
||||
__handleBuildSystem__(buildSystem)
|
||||
if withControls:
|
||||
requiredQt = "5.7"
|
||||
# TODO use parameter to define style to choose
|
||||
test.log("Using default controls style")
|
||||
clickButton(waitForObject(":Next_QPushButton"))
|
||||
else:
|
||||
requiredQt = __createProjectHandleQtQuickSelection__(minimumQtVersion)
|
||||
__modifyAvailableTargets__(available, requiredQt)
|
||||
checkedTargets = __chooseTargets__(targets, available)
|
||||
|
@@ -30,26 +30,20 @@ def main():
|
||||
if not startedWithoutPluginError():
|
||||
return
|
||||
|
||||
available = [("5.6", False), ("5.6", True)]
|
||||
available = [("5.6", "Qt Quick Application - Empty", Targets.DESKTOP_5_6_1_DEFAULT),
|
||||
("5.10", "Qt Quick Application - Swipe", Targets.DESKTOP_5_10_1_DEFAULT)]
|
||||
|
||||
for qtVersion, controls in available:
|
||||
targ = Targets.DESKTOP_5_6_1_DEFAULT
|
||||
for qtVersion, appTemplate, targ in available:
|
||||
# using a temporary directory won't mess up a potentially existing
|
||||
workingDir = tempDir()
|
||||
checkedTargets = createNewQtQuickApplication(workingDir, targets=[targ],
|
||||
minimumQtVersion=qtVersion,
|
||||
withControls = controls)[0]
|
||||
template=appTemplate)[0]
|
||||
if len(checkedTargets) == 0:
|
||||
if controls and qtVersion < "5.7":
|
||||
test.xfail("Could not check wanted target.", "Quick Controls 2 wizard needs Qt5.7+")
|
||||
else:
|
||||
test.fatal("Could not check wanted target")
|
||||
continue
|
||||
additionalText = ''
|
||||
if controls:
|
||||
additionalText = ' Controls '
|
||||
test.log("Building project Qt Quick%sApplication (%s)"
|
||||
% (additionalText, Targets.getStringForTarget(targ)))
|
||||
test.log("Building project %s (%s)"
|
||||
% (appTemplate, Targets.getStringForTarget(targ)))
|
||||
invokeMenuItem("Build", "Build All")
|
||||
waitForCompile()
|
||||
if not checkCompile():
|
||||
|
Reference in New Issue
Block a user