Escape Qt keywords and QObject method names used as identifiers
Add emit, foreach, forever, connect, and disconnect to the Qt-specific
reserved words list in CppQt6AbstractCodegen.
Add a Java unit test and a C++ auto test covering Qt keywords and
QObject method names used as operationIds, parameter names, model
property names, and enum values. Also register the java unit tests
via add_test() so they are discoverable by CI.
The Java unit test uses toVarName() rather than isReservedWord()
directly because isReservedWord() and the reservedWords field are both
protected in DefaultCodegen and inaccessible from a different package.
toVarName() delegates to escapeReservedWord() when a word is reserved.
C++ keywords (class, template, operator, etc.) are the responsibility
of the upstream AbstractCppCodegen, but since there are no upstream
tests for them, they are also covered by the Java unit test here.
Remove the pre-existing launchCodeGenerator() test: it had no
assertions, and the yaml_files/ directory it depended on no longer
exists.
Task-number: QTBUG-145028
Pick-to: 6.11
Change-Id: I32a1bb3ea43f4215448c317f344798e96daa5bf5
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>