forked from qt-creator/qt-creator
ProjectExplorer: Expose ToolChain type ids as kit features
This should allow wizards to restrict the list of kits based on a required toolchain Change-Id: Ic2b76c9146ce65f197f2bacb41138a2bf9815e65 Reviewed-by: hjk <hjk@qt.io> Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
This commit is contained in:
@@ -363,6 +363,14 @@ IOutputParser *ToolChainKitInformation::createOutputParser(const Kit *k) const
|
||||
return 0;
|
||||
}
|
||||
|
||||
QSet<Core::Id> ToolChainKitInformation::availableFeatures(const Kit *k) const
|
||||
{
|
||||
QSet<Core::Id> result;
|
||||
for (ToolChain *tc : toolChains(k))
|
||||
result.insert(tc->typeId().withPrefix("ToolChain."));
|
||||
return result;
|
||||
}
|
||||
|
||||
Core::Id ToolChainKitInformation::id()
|
||||
{
|
||||
return Constants::KITINFORMATION_ID_V3;
|
||||
|
@@ -92,6 +92,7 @@ public:
|
||||
void addToEnvironment(const Kit *k, Utils::Environment &env) const override;
|
||||
void addToMacroExpander(Kit *kit, Utils::MacroExpander *expander) const override;
|
||||
IOutputParser *createOutputParser(const Kit *k) const override;
|
||||
QSet<Core::Id> availableFeatures(const Kit *k) const override;
|
||||
|
||||
static Core::Id id();
|
||||
static ToolChain *toolChain(const Kit *k, Core::Id language);
|
||||
|
Reference in New Issue
Block a user