KCModule & KConfigXT
Frans Englich
frans.englich at telia.com
Sat Jul 10 17:02:03 BST 2004
On Saturday 10 July 2004 10:43, Matthias Kretz wrote:
> On Friday 09 July 2004 23:58, Frans Englich wrote:
> > Attached rough patch tries to add KConfigXT support to KCModule. Attached
> > main.cpp(plus a designer and kcfg file) is an example on how the code
> > would look like for such an module. "It Works."
>
> Why do you need to discard the first call to KCModule::changed()? This will
> of course break existing code...
>
> You added a new ctor to KCModule, right? But the other ctors set
> d->_instance, yours doesn't. d->_instance is uninitialized but later on
> deleted by the dtor and could be dereferenced by using
> KCModule::instance().
>
> Perhaps you shouldn't add the new ctor but only the addConfig method.
Ok, here's an attached improvement.
* I removed the constructor because it had no usage scenario: Since it uses
the this pointer, the KConfigManager can't find the widgets.
* What about deprecating sysdefaults()? It's not even used in a grep through
all kde modules.
* What about:
virtual void load();
// ### KDE 4: Call load() automatically through a single-shot timer
// from the constructor // and change documentation
// FIXME: Why not do it now? How can it break?
* If the patch looks good, apply now(KDE 3.3)?
Matthias, you may be interested in:
http://lists.kde.org/?l=kde-cvs&m=108940226422428&w=2
http://lists.kde.org/?l=kde-cvs&m=108940352729716&w=2
Frans
-------------- next part --------------
A non-text attachment was scrubbed...
Name: kcmodule_kconfigxt_v2.diff
Type: text/x-diff
Size: 9541 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20040710/d9ff792b/attachment.diff>
More information about the kde-core-devel
mailing list