From 3f97874ca1056bca0baf8876466fbb8c8cd61971 Mon Sep 17 00:00:00 2001 From: Christian Stenger Date: Thu, 26 Jul 2018 14:04:17 +0200 Subject: [PATCH] Squish: Fix tests after revert The patch that removed Qt4 completely from the widget app wizard has been reverted. Adjusting the tests now. Change-Id: I0af1eb2102caa22022658d1189794c7757c7628f Reviewed-by: Robert Loehning --- tests/system/shared/project.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/tests/system/shared/project.py b/tests/system/shared/project.py index 313ace186cc..71b493c5463 100644 --- a/tests/system/shared/project.py +++ b/tests/system/shared/project.py @@ -156,8 +156,12 @@ def __createProjectHandleQtQuickSelection__(minimumQtVersion): # Selects the Qt versions for a project # param checks turns tests in the function on if set to True # param available a list holding the available targets -def __selectQtVersionDesktop__(checks, available=None): - checkedTargets = __chooseTargets__(Targets.desktopTargetClasses(), available) +# withoutQt4 if True Qt4 will get unchecked / not selected while checking the targets +def __selectQtVersionDesktop__(checks, available=None, withoutQt4=False): + wanted = Targets.desktopTargetClasses() + if withoutQt4 and Targets.DESKTOP_4_8_7_DEFAULT in wanted: + wanted.remove(Targets.DESKTOP_4_8_7_DEFAULT) + checkedTargets = __chooseTargets__(wanted, available) if checks: for target in checkedTargets: detailsWidget = waitForObject("{type='Utils::DetailsWidget' unnamed='1' visible='1' " @@ -216,7 +220,7 @@ def createProject_Qt_GUI(path, projectName, checks = True, addToVersionControl = template = "Qt Widgets Application" available = __createProjectOrFileSelectType__(" Application", template) __createProjectSetNameAndPath__(path, projectName, checks) - checkedTargets = __selectQtVersionDesktop__(checks, available) + checkedTargets = __selectQtVersionDesktop__(checks, available, True) if checks: exp_filename = "mainwindow" @@ -541,7 +545,7 @@ def __getSupportedPlatforms__(text, templateName, getAsStrings=False): supports = text[text.find('Supported Platforms'):].split(":")[1].strip().split(" ") result = [] if 'Desktop' in supports: - if (version == None or version < "5.0") and templateName != "Qt Widgets Application": + if (version == None or version < "5.0"): result.append(Targets.DESKTOP_4_8_7_DEFAULT) if platform.system() in ("Linux", "Darwin"): result.append(Targets.EMBEDDED_LINUX)