forked from qt-creator/qt-creator
MacroExpander: Allow registering local expansions
This allows a MacroExpander also to describe an expansion it can do which was restricted to the global VariableManager only. The global is now just a thin (unneeded) wrapper about new "standard" functionality. Change-Id: Ida7ca70cf3d319eae4220ea8d12f3dd1c0d4042c Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
This commit is contained in:
@@ -302,18 +302,15 @@ KitConfigWidget *DebuggerKitInformation::createConfigWidget(Kit *k) const
|
||||
return new Internal::DebuggerKitConfigWidget(k, this);
|
||||
}
|
||||
|
||||
AbstractMacroExpander *DebuggerKitInformation::createMacroExpander(const Kit *k) const
|
||||
bool DebuggerKitInformation::resolveMacro(const Kit *kit, const QString &name, QString *ret) const
|
||||
{
|
||||
return new MacroExpander([k, this](const QString &name, QString *ret) -> bool {
|
||||
const DebuggerItem *item = DebuggerKitInformation::debugger(k);
|
||||
const DebuggerItem *item = debugger(kit);
|
||||
if (name == QLatin1String("Debugger:engineType")) {
|
||||
*ret = item ? item->engineTypeName() : tr("none");
|
||||
return true;
|
||||
}
|
||||
|
||||
if (name == QLatin1String("Debugger:engineType")) {
|
||||
*ret = item ? item->engineTypeName() : tr("none");
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
});
|
||||
return false;
|
||||
}
|
||||
|
||||
KitInformation::ItemList DebuggerKitInformation::toUserOutput(const Kit *k) const
|
||||
|
||||
Reference in New Issue
Block a user