Commit 50c63436 authored by Robert Loehning's avatar Robert Loehning

Squish: Remove outdated kit handling code

Change-Id: I69f1b6d0d27e9330ff23de0b9d5a09ef02f353ac
Reviewed-by: default avatarChristian Stenger <christian.stenger@theqtcompany.com>
parent 52d89196
...@@ -32,13 +32,11 @@ import operator ...@@ -32,13 +32,11 @@ import operator
# for easier re-usage (because Python hasn't an enum type) # for easier re-usage (because Python hasn't an enum type)
class Targets: class Targets:
ALL_TARGETS = map(lambda x: 2 ** x , range(9)) ALL_TARGETS = map(lambda x: 2 ** x , range(7))
(DESKTOP_474_GCC, (DESKTOP_474_GCC,
DESKTOP_480_DEFAULT, DESKTOP_480_DEFAULT,
SIMULATOR, SIMULATOR,
MAEMO5,
HARMATTAN,
EMBEDDED_LINUX, EMBEDDED_LINUX,
DESKTOP_521_DEFAULT, DESKTOP_521_DEFAULT,
DESKTOP_531_DEFAULT, DESKTOP_531_DEFAULT,
...@@ -46,8 +44,7 @@ class Targets: ...@@ -46,8 +44,7 @@ class Targets:
@staticmethod @staticmethod
def desktopTargetClasses(): def desktopTargetClasses():
desktopTargets = (sum(Targets.ALL_TARGETS) & ~Targets.SIMULATOR & ~Targets.MAEMO5 desktopTargets = (sum(Targets.ALL_TARGETS) & ~Targets.SIMULATOR & ~Targets.EMBEDDED_LINUX)
& ~Targets.HARMATTAN & ~Targets.EMBEDDED_LINUX)
if platform.system() == 'Darwin': if platform.system() == 'Darwin':
desktopTargets &= ~Targets.DESKTOP_541_GCC desktopTargets &= ~Targets.DESKTOP_541_GCC
return desktopTargets return desktopTargets
...@@ -61,12 +58,8 @@ class Targets: ...@@ -61,12 +58,8 @@ class Targets:
return "Desktop 480 MSVC2010" return "Desktop 480 MSVC2010"
else: else:
return "Desktop 480 GCC" return "Desktop 480 GCC"
elif target == Targets.MAEMO5:
return "Fremantle"
elif target == Targets.SIMULATOR: elif target == Targets.SIMULATOR:
return "Qt Simulator" return "Qt Simulator"
elif target == Targets.HARMATTAN:
return "Harmattan"
elif target == Targets.EMBEDDED_LINUX: elif target == Targets.EMBEDDED_LINUX:
return "Embedded Linux" return "Embedded Linux"
elif target == Targets.DESKTOP_521_DEFAULT: elif target == Targets.DESKTOP_521_DEFAULT:
......
...@@ -394,9 +394,6 @@ def __chooseTargets__(targets=Targets.DESKTOP_474_GCC, availableTargets=None): ...@@ -394,9 +394,6 @@ def __chooseTargets__(targets=Targets.DESKTOP_474_GCC, availableTargets=None):
available.remove(Targets.EMBEDDED_LINUX) available.remove(Targets.EMBEDDED_LINUX)
elif platform.system() == 'Darwin': elif platform.system() == 'Darwin':
available.remove(Targets.DESKTOP_541_GCC) available.remove(Targets.DESKTOP_541_GCC)
for target in filter(lambda x: x in available,
(Targets.MAEMO5, Targets.HARMATTAN)):
available.remove(target)
checkedTargets = [] checkedTargets = []
for current in available: for current in available:
mustCheck = targets & current == current mustCheck = targets & current == current
...@@ -624,14 +621,9 @@ def __getSupportedPlatforms__(text, templateName, getAsStrings=False): ...@@ -624,14 +621,9 @@ def __getSupportedPlatforms__(text, templateName, getAsStrings=False):
result.extend([Targets.DESKTOP_521_DEFAULT, Targets.DESKTOP_531_DEFAULT]) result.extend([Targets.DESKTOP_521_DEFAULT, Targets.DESKTOP_531_DEFAULT])
if platform.system() != 'Darwin': if platform.system() != 'Darwin':
result.append(Targets.DESKTOP_541_GCC) result.append(Targets.DESKTOP_541_GCC)
if 'MeeGo/Harmattan' in supports:
result.append(Targets.HARMATTAN)
if 'Maemo/Fremantle' in supports:
result.append(Targets.MAEMO5)
if not ("BlackBerry" in templateName or re.search("custom Qt Creator plugin", text)) and (version == None or version < "5.0"): if not ("BlackBerry" in templateName or re.search("custom Qt Creator plugin", text)) and (version == None or version < "5.0"):
result.append(Targets.SIMULATOR) result.append(Targets.SIMULATOR)
elif 'Platform independent' in text: elif 'Platform independent' in text:
# MAEMO5 and HARMATTAN could be wrong here - depends on having Madde plugin enabled or not
result = list(Targets.ALL_TARGETS) result = list(Targets.ALL_TARGETS)
result.remove(Targets.EMBEDDED_LINUX) result.remove(Targets.EMBEDDED_LINUX)
if platform.system() == 'Darwin': if platform.system() == 'Darwin':
......
...@@ -380,20 +380,15 @@ def getConfiguredKits(): ...@@ -380,20 +380,15 @@ def getConfiguredKits():
iterateKits(True, True, __setQtVersionForKit__, kitsWithQtVersionName) iterateKits(True, True, __setQtVersionForKit__, kitsWithQtVersionName)
# merge defined target names with their configured Qt versions and devices # merge defined target names with their configured Qt versions and devices
for kit, qtVersion in kitsWithQtVersionName.iteritems(): for kit, qtVersion in kitsWithQtVersionName.iteritems():
if kit in ('Fremantle', 'Harmattan') and qtVersion == 'None': if kit in ('Fremantle', 'Harmattan'):
test.log("Found Kit '%s' with unassigned Qt version (disabled Madde plugin)" % kit) test.verify(qtVersion == 'None',
"The outdated kit '%s' should not have a Qt version" % kit)
elif qtVersion in qtVersionNames: elif qtVersion in qtVersionNames:
result[kit] = targetsQtVersions[qtVersionNames.index(qtVersion)].items()[0] result[kit] = targetsQtVersions[qtVersionNames.index(qtVersion)].items()[0]
else: else:
test.fail("Qt version '%s' for kit '%s' can't be found in qtVersionNames." test.fail("Qt version '%s' for kit '%s' can't be found in qtVersionNames."
% (qtVersion, kit)) % (qtVersion, kit))
clickButton(waitForObject(":Options.Cancel_QPushButton")) clickButton(waitForObject(":Options.Cancel_QPushButton"))
# adjust device name(s) to match getStringForTarget() - some differ from time to time
for targetName in result.keys():
targetInfo = result[targetName]
if targetInfo[0] == "Maemo":
result.update({targetName:
(Targets.getStringForTarget(Targets.MAEMO5), targetInfo[1])})
test.log("Configured kits: %s" % str(result)) test.log("Configured kits: %s" % str(result))
return result return result
......
...@@ -49,10 +49,7 @@ def main(): ...@@ -49,10 +49,7 @@ def main():
test.compare("Projects", str(projects.data())) test.compare("Projects", str(projects.data()))
comboBox = findObject(":New.comboBox_QComboBox") comboBox = findObject(":New.comboBox_QComboBox")
targets = zip(*kits.values())[0] targets = zip(*kits.values())[0]
maddeTargets = Targets.getTargetsAsStrings([Targets.MAEMO5, Targets.HARMATTAN])
maddeInTargets = len(set(targets) & set(maddeTargets)) > 0
test.verify(comboBox.enabled, "Verifying whether combobox is enabled.") test.verify(comboBox.enabled, "Verifying whether combobox is enabled.")
test.verify(not maddeInTargets, "Verify there are no leftovers of Madde")
test.compare(comboBox.currentText, "Desktop Templates") test.compare(comboBox.currentText, "Desktop Templates")
selectFromCombo(comboBox, "All Templates") selectFromCombo(comboBox, "All Templates")
for category in [item.replace(".", "\\.") for item in dumpItems(catModel, projects)]: for category in [item.replace(".", "\\.") for item in dumpItems(catModel, projects)]:
...@@ -84,11 +81,6 @@ def main(): ...@@ -84,11 +81,6 @@ def main():
if counter < len(quickCombinations) - 1: if counter < len(quickCombinations) - 1:
displayedPlatforms = __createProject__(category, template) displayedPlatforms = __createProject__(category, template)
continue continue
try:
waitForObject("{name='mainQmlFileGroupBox' title='Main HTML File' type='QGroupBox' visible='1'}", 1000)
clickButton(waitForObject(":Next_QPushButton"))
except LookupError:
pass
verifyKitCheckboxes(kits, displayedPlatforms) verifyKitCheckboxes(kits, displayedPlatforms)
clickButton(waitForObject("{type='QPushButton' text='Cancel' visible='1'}")) clickButton(waitForObject("{type='QPushButton' text='Cancel' visible='1'}"))
invokeMenuItem("File", "Exit") invokeMenuItem("File", "Exit")
......
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