forked from qt-creator/qt-creator
Qmake: Add a macro expander to get the currently configured mkspec of a kit
Change-Id: I97cd6f47c20867277ed7612a0cf5a179dedd7501 Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
This commit is contained in:
@@ -101,6 +101,14 @@ KitInformation::ItemList QmakeKitInformation::toUserOutput(const Kit *k) const
|
||||
return ItemList() << qMakePair(tr("mkspec"), mkspec(k).toUserOutput());
|
||||
}
|
||||
|
||||
void QmakeKitInformation::addToMacroExpander(Kit *kit, MacroExpander *expander) const
|
||||
{
|
||||
expander->registerVariable("Qmake:mkspec", tr("Mkspec configured for qmake by the Kit."),
|
||||
[this, kit]() -> QString {
|
||||
return QmakeKitInformation::mkspec(kit).toUserOutput();
|
||||
});
|
||||
}
|
||||
|
||||
Core::Id QmakeKitInformation::id()
|
||||
{
|
||||
return "QtPM4.mkSpecInformation";
|
||||
|
@@ -47,6 +47,8 @@ public:
|
||||
|
||||
ItemList toUserOutput(const ProjectExplorer::Kit *k) const override;
|
||||
|
||||
void addToMacroExpander(ProjectExplorer::Kit *kit, Utils::MacroExpander *expander) const override;
|
||||
|
||||
static Core::Id id();
|
||||
static void setMkspec(ProjectExplorer::Kit *k, const Utils::FileName &fn);
|
||||
static Utils::FileName mkspec(const ProjectExplorer::Kit *k);
|
||||
|
Reference in New Issue
Block a user