Utils: Centralize aspect macro expansion setup and handling

Let each aspect have a macro expander, and let aspect-owned lineedits
use this for expansion.

Change-Id: Ifa6f5a678cf81c169643e4145f41e69eafedeb93
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
This commit is contained in:
hjk
2024-06-07 14:59:00 +02:00
parent 685694c7a9
commit d308b86847
17 changed files with 60 additions and 81 deletions

View File

@@ -1463,12 +1463,9 @@ CMakeBuildConfiguration::CMakeBuildConfiguration(Target *target, Id id)
buildTypeAspect.setDisplayStyle(StringAspect::LineEditDisplay);
buildTypeAspect.setDefaultValue("Unknown");
initialCMakeArguments.setMacroExpanderProvider([this] { return macroExpander(); });
additionalCMakeOptions.setSettingsKey("CMake.Additional.Options");
additionalCMakeOptions.setLabelText(Tr::tr("Additional CMake <a href=\"options\">options</a>:"));
additionalCMakeOptions.setDisplayStyle(StringAspect::LineEditDisplay);
additionalCMakeOptions.setMacroExpanderProvider([this] { return macroExpander(); });
macroExpander()->registerVariable(DEVELOPMENT_TEAM_FLAG,
Tr::tr("The CMake flag for the development team"),