Squish: Adapt handling for project creation

Some templates got an additional page for handling translations.

Change-Id: I420e4f1bd8be5a30056220abd73b3f9da44d5047
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: Robert Loehning <robert.loehning@qt.io>
This commit is contained in:
Christian Stenger
2019-09-30 11:13:02 +02:00
committed by Robert Loehning
parent 6fd29da2cb
commit cc67ad8736
2 changed files with 12 additions and 0 deletions

View File

@@ -116,6 +116,11 @@ def __createProjectSetNameAndPath__(path, projectName = None, checks = True):
clickButton(waitForObject(":Next_QPushButton")) clickButton(waitForObject(":Next_QPushButton"))
return str(projectName) return str(projectName)
def __createProjectHandleTranslationSelection__():
clickButton(":Next_QPushButton")
def __handleBuildSystem__(buildSystem): def __handleBuildSystem__(buildSystem):
combo = "{name='BuildSystem' type='QComboBox' visible='1'}" combo = "{name='BuildSystem' type='QComboBox' visible='1'}"
try: try:
@@ -230,6 +235,7 @@ def createProject_Qt_GUI(path, projectName, checks = True, addToVersionControl =
test.compare(findObject(":formFileLineEdit_Utils::FileNameValidatingLineEdit").text, ui_file) test.compare(findObject(":formFileLineEdit_Utils::FileNameValidatingLineEdit").text, ui_file)
clickButton(waitForObject(":Next_QPushButton")) clickButton(waitForObject(":Next_QPushButton"))
__createProjectHandleTranslationSelection__()
__selectQtVersionDesktop__(checks, available, True) __selectQtVersionDesktop__(checks, available, True)
expectedFiles = [] expectedFiles = []
@@ -253,6 +259,7 @@ def createProject_Qt_Console(path, projectName, checks = True, buildSystem = Non
available = __createProjectOrFileSelectType__(" Application", "Qt Console Application") available = __createProjectOrFileSelectType__(" Application", "Qt Console Application")
__createProjectSetNameAndPath__(path, projectName, checks) __createProjectSetNameAndPath__(path, projectName, checks)
__handleBuildSystem__(buildSystem) __handleBuildSystem__(buildSystem)
__createProjectHandleTranslationSelection__()
__selectQtVersionDesktop__(checks, available) __selectQtVersionDesktop__(checks, available)
expectedFiles = [] expectedFiles = []
@@ -279,6 +286,7 @@ def createNewQtQuickApplication(workingDir, projectName=None,
__handleBuildSystem__(buildSystem) __handleBuildSystem__(buildSystem)
requiredQt = __createProjectHandleQtQuickSelection__(minimumQtVersion) requiredQt = __createProjectHandleQtQuickSelection__(minimumQtVersion)
__modifyAvailableTargets__(available, requiredQt) __modifyAvailableTargets__(available, requiredQt)
__createProjectHandleTranslationSelection__()
checkedTargets = __chooseTargets__(targets, available) checkedTargets = __chooseTargets__(targets, available)
snooze(1) snooze(1)
if len(checkedTargets): if len(checkedTargets):
@@ -368,6 +376,7 @@ def createNewCPPLib(projectDir, projectName, className, target, isStatic):
LibType.getStringForLib(libType)) LibType.getStringForLib(libType))
__createProjectHandleModuleSelection__("Core") __createProjectHandleModuleSelection__("Core")
className = __createProjectHandleClassInformation__(className) className = __createProjectHandleClassInformation__(className)
__createProjectHandleTranslationSelection__()
__chooseTargets__(target, available) __chooseTargets__(target, available)
clickButton(waitForObject(":Next_QPushButton")) clickButton(waitForObject(":Next_QPushButton"))
__createProjectHandleLastPage__() __createProjectHandleLastPage__()
@@ -381,6 +390,7 @@ def createNewQtPlugin(projectDir, projectName, className, target, baseClass="QGe
"window=':New_ProjectExplorer::JsonWizard'}"), "window=':New_ProjectExplorer::JsonWizard'}"),
LibType.getStringForLib(LibType.QT_PLUGIN)) LibType.getStringForLib(LibType.QT_PLUGIN))
className = __createProjectHandleClassInformation__(className, baseClass) className = __createProjectHandleClassInformation__(className, baseClass)
__createProjectHandleTranslationSelection__()
__chooseTargets__(target, available) __chooseTargets__(target, available)
clickButton(waitForObject(":Next_QPushButton")) clickButton(waitForObject(":Next_QPushButton"))
__createProjectHandleLastPage__() __createProjectHandleLastPage__()

View File

@@ -132,6 +132,8 @@ def handleBuildSystemVerifyKits(category, template, kits, displayedPlatforms,
clickButton(waitForObject(":Next_QPushButton")) clickButton(waitForObject(":Next_QPushButton"))
if specialHandlingFunc: if specialHandlingFunc:
specialHandlingFunc(displayedPlatforms, *args) specialHandlingFunc(displayedPlatforms, *args)
if not ('Plain C' in template):
__createProjectHandleTranslationSelection__()
verifyKitCheckboxes(kits, displayedPlatforms) verifyKitCheckboxes(kits, displayedPlatforms)
safeClickButton("Cancel") safeClickButton("Cancel")
if counter < len(availableBuildSystems) - 1: if counter < len(availableBuildSystems) - 1: