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:
Robert Loehning
2018-08-02 11:26:43 +02:00
parent 01aafd8021
commit e8acb75115
21 changed files with 149 additions and 223 deletions

View File

@@ -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