Fix KConfig generator with Enums, Generators and Properties.
The code fails to compile with
Mutators=true
GenerateProperties=true
Just with GenerateProperties, the itemPowerButton
proof:
Consolidate compiler generated dependencies of target test_enums_and_properties
[ 34%] Building CXX object autotests/kconfig_compiler/CMakeFiles/test_enums_and_properties.dir/test_enums_and_properties_autogen/mocs_compilation.cpp.o
[ 35%] Building CXX object autotests/kconfig_compiler/CMakeFiles/test_enums_and_properties.dir/test10main.cpp.o
[ 35%] Building CXX object autotests/kconfig_compiler/CMakeFiles/test_enums_and_properties.dir/test_enums_and_properties.cpp.o
/data/build/gcc-arch/kconfig/autotests/kconfig_compiler/test_enums_and_properties.cpp: In constructor 'TestEnumsAndProperties::TestEnumsAndProperties()':
/data/build/gcc-arch/kconfig/autotests/kconfig_compiler/test_enums_and_properties.cpp:63:26: error: 'class KConfigCompilerSignallingItem' has no member named 'setValueForChoice'
63 | itemPowerButtonAction->setValueForChoice(QStringLiteral( "NoneMode" ), QStringLiteral( "0" ));
| ^~~~~~~~~~~~~~~~~
/data/build/gcc-arch/kconfig/autotests/kconfig_compiler/test_enums_and_properties.cpp:64:26: error: 'class KConfigCompilerSignallingItem' has no member named 'setValueForChoice'
64 | itemPowerButtonAction->setValueForChoice(QStringLiteral( "ToRamMode" ), QStringLiteral( "1" ));
| ^~~~~~~~~~~~~~~~~
/data/build/gcc-arch/kconfig/autotests/kconfig_compiler/test_enums_and_properties.cpp:65:26: error: 'class KConfigCompilerSignallingItem' has no member named 'setValueForChoice'
65 | itemPowerButtonAction->setValueForChoice(QStringLiteral( "ToDiskMode" ), QStringLiteral( "2" ));
| ^~~~~~~~~~~~~~~~~
/data/build/gcc-arch/kconfig/autotests/kconfig_compiler/test_enums_and_properties.cpp:66:26: error: 'class KConfigCompilerSignallingItem' has no member named 'setValueForChoice'
66 | itemPowerButtonAction->setValueForChoice(QStringLiteral( "SuspendHybridMode" ), QStringLiteral( "4" ));
| ^~~~~~~~~~~~~~~~~
/data/build/gcc-arch/kconfig/autotests/kconfig_compiler/test_enums_and_properties.cpp:67:26: error: 'class KConfigCompilerSignallingItem' has no member named 'setValueForChoice'
67 | itemPowerButtonAction->setValueForChoice(QStringLiteral( "ShutdownMode" ), QStringLiteral( "8" ));
| ^~~~~~~~~~~~~~~~~
/data/build/gcc-arch/kconfig/autotests/kconfig_compiler/test_enums_and_properties.cpp:68:26: error: 'class KConfigCompilerSignallingItem' has no member named 'setValueForChoice'
68 | itemPowerButtonAction->setValueForChoice(QStringLiteral( "LogoutDialogMode" ), QStringLiteral( "16" ));
| ^~~~~~~~~~~~~~~~~
/data/build/gcc-arch/kconfig/autotests/kconfig_compiler/test_enums_and_properties.cpp:69:26: error: 'class KConfigCompilerSignallingItem' has no member named 'setValueForChoice'
69 | itemPowerButtonAction->setValueForChoice(QStringLiteral( "LockScreenMode" ), QStringLiteral( "32" ));
| ^~~~~~~~~~~~~~~~~
/data/build/gcc-arch/kconfig/autotests/kconfig_compiler/test_enums_and_properties.cpp:70:26: error: 'class KConfigCompilerSignallingItem' has no member named 'setValueForChoice'
70 | itemPowerButtonAction->setValueForChoice(QStringLiteral( "TurnOffScreenMode" ), QStringLiteral( "64" ));
| ^~~~~~~~~~~~~~~~~
/data/build/gcc-arch/kconfig/autotests/kconfig_compiler/test_enums_and_properties.cpp:71:26: error: 'class KConfigCompilerSignallingItem' has no member named 'setValueForChoice'
71 | itemPowerButtonAction->setValueForChoice(QStringLiteral( "ToggleScreenOnOffMode" ), QStringLiteral( "128" ));
| ^~~~~~~~~~~~~~~~~
make[2]: *** [autotests/kconfig_compiler/CMakeFiles/test_enums_and_properties.dir/build.make:118: autotests/kconfig_compiler/CMakeFiles/test_enums_and_properties.dir/test_enums_and_properties.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:1445: autotests/kconfig_compiler/CMakeFiles/test_enums_and_properties.dir/all] Error 2
make: *** [Makefile:146: all] Error 2
FAIL: 2
Edited by Tomaz Canabrava