forked from qt-creator/qt-creator
Squish: Refactor selecting configured Kits in project
The design of the Projects mode changed several times. We wrote lots of workarounds to keep even more old code alive because we never had the time for a proper refactoring. This time is now. Leads to more stable code with far less variables flying around. Task-number: QTCREATORBUG-20265 Change-Id: I29e5956ea3279cdb1d6da61bf5b461666de436bc Reviewed-by: Robert Loehning <robert.loehning@qt.io> Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -81,6 +81,13 @@ class Targets:
|
||||
test.fatal("You've passed at least one unknown target!")
|
||||
return result
|
||||
|
||||
@staticmethod
|
||||
def getIdForTargetName(targetName):
|
||||
for id in Targets.ALL_TARGETS:
|
||||
if Targets.getStringForTarget(id) == targetName:
|
||||
return id
|
||||
raise Exception("'%s' is not a known target name" % targetName)
|
||||
|
||||
@staticmethod
|
||||
def getDefaultKit():
|
||||
return Targets.DESKTOP_5_6_1_DEFAULT
|
||||
|
||||
Reference in New Issue
Block a user