Utils: Change signature of MacroExpander::registerFileVariables

... to take a function returning a FilePath as base.

Implementation is (not) yet changed.

Change-Id: I624efab35cf38631c816b630be5296bdf696899e
Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
hjk
2021-06-01 18:18:02 +02:00
parent 018dfc533c
commit f4a529ea95
11 changed files with 37 additions and 36 deletions

View File

@@ -297,10 +297,10 @@ void CMakeKitAspect::addToMacroExpander(Kit *k, Utils::MacroExpander *expander)
{
QTC_ASSERT(k, return);
expander->registerFileVariables("CMake:Executable", tr("Path to the cmake executable"),
[k]() -> QString {
CMakeTool *tool = CMakeKitAspect::cmakeTool(k);
return tool ? tool->cmakeExecutable().toString() : QString();
});
[k] {
CMakeTool *tool = CMakeKitAspect::cmakeTool(k);
return tool ? tool->cmakeExecutable() : Utils::FilePath();
});
}
QSet<Utils::Id> CMakeKitAspect::availableFeatures(const Kit *k) const