A little review of kdecore & kdeui

Frans Englich frans.englich at telia.com
Thu Apr 6 15:24:09 BST 2006

On Thursday 06 April 2006 12:55, Matthias Kretz wrote:
> On Thursday 06 April 2006 01:21, Thiago Macieira wrote:
> > >> to kcontrol library
> > >> ===================
> > >> KCModule
> > >
> > >I guess this (and kdebase/framework) means that kdebase being installed
> > > is becoming a requirement before compiling other modules.
> >
> > Is KCModule used for anything outside kcontrol?
> >
> > Is KCModule required to embed a kcontrol config page into an
> > application's config page (like kicker or kdesktop)?
> KCModules are used for application configuration dialogs as well.

Yes, here's the dependencies involved(AFAICT):

* Modules which are to embed into a configuration dialog needs KCModule, 
nothing more.

* The one who is to embed/load modules doesn't need KCModule, but a range of 
classes found in kutils. The kutils dependencies are rather heavy: kcmshell 
for re-loading modules in root mode(obviously not needed in all cases, but 
for k3b, for example), and DCOP for tracking that the same module is not 
opened twice in different applications.

So, keeping KCModule in a "low level UI library" makes sense, because then 
configuration modules doesn't bring in unnecessary code such as 
KCModuleProxy, KCMultiDialog, etc.

> Applications that want to incorporate modules from plugins can make use of
> KCModules through KCMultiDialog or even more convenient using
> KSettings::Dialog (KView used it, Kontact and Kopete use it, Konqueror
> should use it (AFAIK it still uses kcmshell) 

Nope, I converted it a half year ago, or something like that. Kontact/KMail 
was also converted, IIRC.

/IIRC/, with the changes that were done, there is no longer a reason to use 
kcmshell for an application's configuration dialog, except for when loading 
them in root mode(kcmshell is also useful with shell scripts and stuff like 
that, of course)

> and other applications 
> extensively making use of component technologies could make use of it).
> The KCModule concept is a lot more usefull than only for KControl.

Yupp. While we're on the topic: from a code perspective kcontrol is very 
obsolete, so I don't think one should bother much about what the code says. 
For example, kdenonbeta/kcontrol4 consist of 400 loc and takes advantage of 
kdelibs, and is more or less functionally equivalent, while kcontrol consist 
of 5000, iirc. It will probably naturally be solved, when it is replaced(with 
what is of course a complete different issue).



More information about the kde-core-devel mailing list