Fix writeFlags with KConfigCompilerSignallingItem
ClosedPublic

Authored by davidedmundson on Dec 6 2019, 7:00 PM.

Details

Summary

KConfigCompilerSignallingItem both inherits KConfigSkeletonItem and
internally is powered by a separate KConfigSkeletonItem

The generated code calls setWriteFlags on the outer
KConfigCompilerSignallingItem instance, but the real writing is
performed by the internal version. We need to set the flags in the right
place.

Ideally we would do this in an overload of KConfigSkeletonItem, but
given we can't, I've shadowed the method. This isn't pretty, but given
the docs say it should generally only be used from auto generated code,
should be fine.

Test Plan

Used in workspace KCM

Diff Detail

Repository
R237 KConfig
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
davidedmundson created this revision.Dec 6 2019, 7:00 PM
Restricted Application added a project: Frameworks. · View Herald TranscriptDec 6 2019, 7:00 PM
Restricted Application added a subscriber: kde-frameworks-devel. · View Herald Transcript
davidedmundson requested review of this revision.Dec 6 2019, 7:00 PM
ervin accepted this revision.Dec 10 2019, 8:31 AM

Indeed not pretty and error prone but as you say: should be fine in autogenerated code

This revision is now accepted and ready to land.Dec 10 2019, 8:31 AM
This revision was automatically updated to reflect the committed changes.