RFC: KConfig XT (KDE 3.2)
hadacek at kde.org
Wed Mar 19 17:17:19 GMT 2003
Oswald Buddenhagen wrote:
> it's not about stuffing everything into one class (even though such an
> implementation is more or less self-evident), but about having the
> entire definition of a config entry at one place. that includes the
> group/key name, default, type, further validity constraints (range,
> string type, etc.), description (tooltip), short description (gui label)
> and whatever one might want to. currently (and with your proposal) all
> this data is spread across the code, so maintaining it is generally a
> bit harder and inconsistencies arise from time to time. with the
> proposed centralized definition the config entry the entire "management"
> part is put into kconfig; the code actually using it only references it
> (and this access can be more or less automatically validated).
I think you definetly want everything at the same place for the reasons
you detailed. My framework (kmines & co) uses an XML file ; some people
have serious fears (Waldo, ...) that loading and parsing even a small
XML file at startup can induce a significant slowdown (?) ; we can use
an ini like file (thought I am not sure if it is much faster) or make
some kind of conversion (should be quite easy IMHO) before compilation
from XML to some C data structures that get compiled in the program. By
also installing the XML file, you get some external access to the config
data ; you lose the hability to modify the default values thought ...
but is this a big problem ?
More information about the kde-core-devel