forked from qt-creator/qt-creator
Squish: Verify targets for project creation
Change-Id: I3af0e0cde985c4b04bd4ae8181c3b82cda22b2b8 Reviewed-by: Robert Löhning <robert.loehning@nokia.com>
This commit is contained in:
@@ -41,6 +41,28 @@ class QtQuickConstants:
|
||||
else:
|
||||
return None
|
||||
|
||||
@staticmethod
|
||||
def getAllTargets():
|
||||
return [QtQuickConstants.Targets.DESKTOP, QtQuickConstants.Targets.HARMATTAN,
|
||||
QtQuickConstants.Targets.MAEMO5, QtQuickConstants.Targets.SIMULATOR,
|
||||
QtQuickConstants.Targets.SYMBIAN]
|
||||
|
||||
@staticmethod
|
||||
def getAllTargetStrings():
|
||||
return QtQuickConstants.getTargetsAsStrings(QtQuickConstants.getAllTargets())
|
||||
|
||||
@staticmethod
|
||||
def getTargetsAsStrings(targets):
|
||||
if not isinstance(targets, (tuple,list)):
|
||||
test.fatal("Wrong usage... This function handles only tuples or lists.")
|
||||
return None
|
||||
result = []
|
||||
for target in targets:
|
||||
result.append(QtQuickConstants.getStringForTarget(target))
|
||||
if None in result:
|
||||
test.fatal("You've passed at least one unknown target!")
|
||||
return result
|
||||
|
||||
# this class holds some constants for easier usage inside the Projects view
|
||||
class ProjectSettings:
|
||||
BUILD = 1
|
||||
|
||||
Reference in New Issue
Block a user