Commit 42580c7d authored by hjk's avatar hjk

ProjectExplorer: Expand %{Device:Name} to device()->displayName()

Change-Id: I9ae7bc0f55933c83aaefb0d1df8e9873386f36a7
Reviewed-by: Tobias Hunger's avatarTobias Hunger <tobias.hunger@qt.io>
parent 25a75d3f
......@@ -662,6 +662,11 @@ void DeviceKitInformation::addToMacroExpander(Kit *kit, Utils::MacroExpander *ex
const IDevice::ConstPtr device = DeviceKitInformation::device(kit);
return device ? device->sshParameters().privateKeyFile : QString();
});
expander->registerVariable("Device:Name", tr("Device name"),
[this, kit]() -> QString {
const IDevice::ConstPtr device = DeviceKitInformation::device(kit);
return device ? device->displayName() : QString();
});
}
Core::Id DeviceKitInformation::id()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment