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:
|
if checks:
|
||||||
__verifyFileCreation__(path, expectedFiles)
|
__verifyFileCreation__(path, expectedFiles)
|
||||||
|
|
||||||
def createNewQtQuickApplication(workingDir, projectName = None,
|
def createNewQtQuickApplication(workingDir, projectName=None,
|
||||||
targets=Targets.desktopTargetClasses(), minimumQtVersion="5.6",
|
targets=Targets.desktopTargetClasses(), minimumQtVersion="5.6",
|
||||||
withControls = False, fromWelcome = False, buildSystem = None):
|
template="Qt Quick Application - Empty", fromWelcome=False,
|
||||||
if withControls:
|
buildSystem=None):
|
||||||
template = "Qt Quick Application - Swipe"
|
|
||||||
else:
|
|
||||||
template = "Qt Quick Application - Empty"
|
|
||||||
available = __createProjectOrFileSelectType__(" Application", template, fromWelcome)
|
available = __createProjectOrFileSelectType__(" Application", template, fromWelcome)
|
||||||
projectName = __createProjectSetNameAndPath__(workingDir, projectName)
|
projectName = __createProjectSetNameAndPath__(workingDir, projectName)
|
||||||
__handleBuildSystem__(buildSystem)
|
__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)
|
requiredQt = __createProjectHandleQtQuickSelection__(minimumQtVersion)
|
||||||
__modifyAvailableTargets__(available, requiredQt)
|
__modifyAvailableTargets__(available, requiredQt)
|
||||||
checkedTargets = __chooseTargets__(targets, available)
|
checkedTargets = __chooseTargets__(targets, available)
|
||||||
|
@@ -30,26 +30,20 @@ def main():
|
|||||||
if not startedWithoutPluginError():
|
if not startedWithoutPluginError():
|
||||||
return
|
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:
|
for qtVersion, appTemplate, targ in available:
|
||||||
targ = Targets.DESKTOP_5_6_1_DEFAULT
|
|
||||||
# using a temporary directory won't mess up a potentially existing
|
# using a temporary directory won't mess up a potentially existing
|
||||||
workingDir = tempDir()
|
workingDir = tempDir()
|
||||||
checkedTargets = createNewQtQuickApplication(workingDir, targets=[targ],
|
checkedTargets = createNewQtQuickApplication(workingDir, targets=[targ],
|
||||||
minimumQtVersion=qtVersion,
|
minimumQtVersion=qtVersion,
|
||||||
withControls = controls)[0]
|
template=appTemplate)[0]
|
||||||
if len(checkedTargets) == 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")
|
test.fatal("Could not check wanted target")
|
||||||
continue
|
continue
|
||||||
additionalText = ''
|
test.log("Building project %s (%s)"
|
||||||
if controls:
|
% (appTemplate, Targets.getStringForTarget(targ)))
|
||||||
additionalText = ' Controls '
|
|
||||||
test.log("Building project Qt Quick%sApplication (%s)"
|
|
||||||
% (additionalText, Targets.getStringForTarget(targ)))
|
|
||||||
invokeMenuItem("Build", "Build All")
|
invokeMenuItem("Build", "Build All")
|
||||||
waitForCompile()
|
waitForCompile()
|
||||||
if not checkCompile():
|
if not checkCompile():
|
||||||
|
Reference in New Issue
Block a user