Bug 426040

Summary: kconfig_compiler: Trouble with config notify signals, are not inherited correctly to subclass .kcfg skeletons.
Product: [Frameworks and Libraries] frameworks-kconfig Reporter: Laura David Hurka <laura.stern>
Component: generalAssignee: Matthew Dawson <matthew>
Status: REPORTED ---    
Severity: normal CC: kdelibs-bugs-null, laura.stern
Priority: NOR    
Version First Reported In: 5.73.0   
Target Milestone: ---   
Platform: Neon   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: Notify signals are not cleanly inherited

Description Laura David Hurka 2020-08-31 22:30:56 UTC
Created attachment 131329 [details]
Notify signals are not cleanly inherited

SUMMARY
When I define a config notify signal (using <signal name="mySignal"/>) in a KConfig skeleton, and create a subclass that modifies mySignal revelant stuff, I can not emit this signal.

STEPS TO REPRODUCE
1. Create a .kcfg file to define a KConfig skeleton, equip it with a <signal/>.
2. Create a second .kcfg file to define a subclass KConfig skeleton, make it inherited by specifying Inherits in the .kcfgc file.
3. Equip the second .kcfg with a property that shall emit the signal from the base skeleton.

OBSERVED RESULT
Option A: Compile error, the signal is defined only in the first skeleton, so the second skeleton does not know the relevant enum values and so on.
Option B: Define the <signal/> in the subclass .kcfg too. No compile error, the signal is just a different one. See screenshot.

EXPECTED RESULT
The subclass skeleton inherits the signal and knows about it.

SOFTWARE/OS VERSIONS
Qt 5.14.2
Frameworks 5.73
kconfig_compiler_kf5 5.73.0

ADDITIONAL INFORMATION
Workarround: Use multiple signals and listen to all of them.
Expected solution A: kconfig_compiler allows to inherit notify signals without trouble.
Expected solution B: https://api.kde.org/frameworks/kconfig/html/kconfig_compiler.html tells me how to inherit signals. (I didn’t read all of them specifically for this issue, but I expect it either in the “Inherits” table row, or where <signal/> is described.)