Fix filename references in templates for reserved word model/API names
The model-body.mustache, api-body.mustache and CMakeLists.txt.mustache
templates were computing filenames via:
{{#lambda.lowercase}}{{{classname}}}{{/lambda.lowercase}}
LowercaseLambda.execute() does more than lowercase: it also calls
escapeReservedWord() when the result is a reserved word:
String text = fragment.execute().toLowerCase(Locale.ROOT);
if (generator != null && generator.reservedWords().contains(text)) {
text = generator.escapeReservedWord(text);
}
So for a model named "Signals" (classname = "Signals"), the lambda
lowercases to "signals", detects it as a reserved word, and produces
"r_signals". However the actual file name is "signals.h". This mismatch
causes wrong #include directives and CMakeLists source lists.
Fix by using {{{classFilename}}} in all three templates. This variable
is set by the generator directly from toModelFilename() /
toApiFilename(), so it always matches the actual file on disk.
Also remove modelNamePrefix from the generator-additional-properties
test client1 so that reserved-word model names are no longer masked by
the prefix.
Task-number: QTBUG-145708
Pick-to: 6.11
Change-Id: I316b4d7bbb467449e88ee308d90c430245821e3e
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>