forked from qt-creator/qt-creator
Debugger: Add variables for compiler and debugger display name
Change-Id: Iee98442317fb1d057ddd7ce7b993124c584660b0 Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
This commit is contained in:
@@ -308,6 +308,12 @@ void DebuggerKitInformation::addToMacroExpander(Kit *kit, MacroExpander *expande
|
||||
const DebuggerItem *item = debugger(kit);
|
||||
return item ? item->engineTypeName() : tr("unknown");
|
||||
});
|
||||
// FIXME: Use better strings.
|
||||
expander->registerVariable("Debugger:Name", tr("Debugger"),
|
||||
[this, kit]() -> QString {
|
||||
const DebuggerItem *item = debugger(kit);
|
||||
return item ? item->displayName() : tr("unknown");
|
||||
});
|
||||
}
|
||||
|
||||
KitInformation::ItemList DebuggerKitInformation::toUserOutput(const Kit *k) const
|
||||
|
@@ -208,6 +208,17 @@ void ToolChainKitInformation::addToEnvironment(const Kit *k, Utils::Environment
|
||||
tc->addToEnvironment(env);
|
||||
}
|
||||
|
||||
void ToolChainKitInformation::addToMacroExpander(Kit *kit, Utils::MacroExpander *expander) const
|
||||
{
|
||||
// FIXME: Use better strings
|
||||
expander->registerVariable("Compiler:Name", tr("Compiler"),
|
||||
[this, kit]() -> QString {
|
||||
const ToolChain *tc = toolChain(kit);
|
||||
return tc ? tc->displayName() : tr("None");
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
IOutputParser *ToolChainKitInformation::createOutputParser(const Kit *k) const
|
||||
{
|
||||
ToolChain *tc = toolChain(k);
|
||||
|
@@ -93,6 +93,7 @@ public:
|
||||
ItemList toUserOutput(const Kit *k) const;
|
||||
|
||||
void addToEnvironment(const Kit *k, Utils::Environment &env) const;
|
||||
void addToMacroExpander(Kit *kit, Utils::MacroExpander *expander) const;
|
||||
IOutputParser *createOutputParser(const Kit *k) const;
|
||||
|
||||
static Core::Id id();
|
||||
|
Reference in New Issue
Block a user