[RFC] Extending KCMultiDialog::addModule

Matthias Kretz kretz at kde.org
Mon Mar 26 13:31:16 BST 2007


On Monday 26 March 2007 13:53, Andreas Pakulat wrote:
> trying to work out KDevelop4's configuration stuff I hit a problem.
> Currently it uses KCModule's to provide configuration widgets and
> kconfigxt stuff, however we need to separate application-global
> configuration from project-specific configuration.

Does that mean you need two different dialogs? What do you mean 
with "separate"?

> There are two problems when I look at KSettings::Dialog
>
> a) it always loads all kcm's that have ParentApp=kdevelop set.

Well, if you open the KDevelop settings dialog don't you want to see all 
configuration pages that belong to kdevelop? I don't understand the problem, 
but that probably can be fixed by explaining the above question. :-)

> b) it creates kcm's without any arguments

Are you using the QStringList parameter in KDevelop? I've never seen a 
use-case for it so it was hard to incorporate into the API.

> Now a) could be worked around by setting ParentApp to some non-existant
> appname (like kdevelop-project) and use ParentComponents with the same
> thing. However b) can only be changed by changing API in kutils.
>
> Now as the solution for a) is also rather hackish I think kdevelop will
> use its own methods of discovering the "right" kcm's and createh
> KCModuleInfo from that. This means we don't need KSettings::Dialog but
> can use KCMultiDialog.

You can, but the idea of KSettings::Dialog is to help applications (that 
depend a lot on plugins) solve the settings dialog problem. If it doesn't 
work it needs to be fixed. There are few enough applications that need it so 
that I believe it's right to exist ceases when applications cannot use it 
because it's too limited.

> So the change I propose is adding a new argument to the
> KCMultiDialog::addModule() methods that resembles the arguments a
> KCModule is given during creation. The attached patch adds this and
> doesn't need any porting of existing apps.

The patch looks good to me. And if you can fix KSettings::Dialog you'll need 
this patch anyway.

-- 
________________________________________________________
Matthias Kretz (Germany)                            <><
http://Vir.homelinux.org/
MatthiasKretz at gmx.net, kretz at kde.org,
Matthias.Kretz at urz.uni-heidelberg.de
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20070326/3126f236/attachment.sig>


More information about the kde-core-devel mailing list