[kconfig_compiler] Improve documentation about Inherits
ClosedPublic

Authored by graesslin on Dec 10 2016, 6:29 PM.

Details

Summary

Better specify the requirements the parent class needs to have.
KConfigCompiler generates different variants of ctors taking either:

  • a QStringLiteral argument (name set in <kcfgfile>
  • a KSharedConfig::Ptr argument (arg="true" in <kcfgfile>)
  • no argument (Inherits=true in kcfgc and no <kcfgfile>)

In order to have Inherits generate compiling code in all cases the
parent class needs to provide accessible ctors.

This change updates the docuementation to reflect this.

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.
graesslin updated this revision to Diff 8912.Dec 10 2016, 6:29 PM
graesslin retitled this revision from to [kconfig_compiler] Improve documentation about Inherits.
graesslin updated this object.
graesslin edited the test plan for this revision. (Show Details)
graesslin added reviewers: Frameworks, dfaure.
nalvarez added inline comments.
src/kconfig_compiler/README.dox
111–115

an ctor -> a ctor.

Also, would it make sense to explain here what those arguments are, or is that explained later?

dfaure added inline comments.
src/kconfig_compiler/README.dox
111–115

Also, "empty ctor" sounds like the body should be empty. I think you meant "a default constructor".

(BTW I would spell out "constructor" instead of using an abbreviation)

Nicolas: indeed it's not clear what the QString is, in this sentence, so rather than duplicating the API documentation for KConfigSkeleton, I suppose this could say:

"and must provide a default constructor, a constructor taking a QString argument (see the one in KConfigSkeleton), and a constructor taking a KSharedConfig::Ptr as argument (see the one in KConfigSkeleton)."

graesslin updated this revision to Diff 9018.Dec 14 2016, 7:00 PM
  • fix typos
  • default instead of empty
  • add information about what the ctor is for
  • refer to KConfigSkeleton documentation
graesslin updated this revision to Diff 9046.Dec 15 2016, 6:02 PM

Constructor instead of ctor

dfaure added inline comments.Dec 15 2016, 6:10 PM
src/kconfig_compiler/README.dox
112

Missing a '(' somewhere, most likely before kcfgfile.

graesslin updated this revision to Diff 9049.Dec 15 2016, 6:17 PM

Add missing "("

dfaure accepted this revision.Dec 15 2016, 6:18 PM
dfaure edited edge metadata.
This revision is now accepted and ready to land.Dec 15 2016, 6:18 PM
This revision was automatically updated to reflect the committed changes.