KMimeTypeChooser

Anders Lund anders at alweb.dk
Sun Apr 11 18:44:48 BST 2004


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Sunday 11 April 2004 17:58, David Faure wrote:
> On Sunday 11 April 2004 01:29, Anders Lund wrote:
> > KConfig *config = kapp->config();
> >  config->setGroup("KMimeTypeChooserDialog");
> >  config->writeEntry("size", size());
>
> Changing kapp->config()'s group from within kdelibs is dangerous practice.
> Better use:
> KConfigGroup group( KGlobal::config(), "KMimeTypeChooserDialog");
> group.writeEntry("size", size());
> Same for reading, of course.

I'm learning new things everyday :)

> Another thing is that constructors should usually have "QWidget *parent,
> const char* name" as the last arguments, not the first. This is what Qt and
> kdelibs do almost everywhere.

Hm, I know that, but that means that you need a overloaded constructor for any 
combination of parameters, or the user has to specify all the empty ones. The 
one parameter most likely to be in any q* derived class is probably the 
parent wheather qwidget or qobject. Is there any sane reason for that 
practice?

- -anders
- -- 
Document your code
Check before committing
Shoot spammers

Given the ugliness of the gmail service, I think everybody
with a democratic mind should stop using google at all.
=== Support democracy and individual freedom ===
=== Find yourself a different search service ===
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)

iD8DBQFAeYQZyyMSZA8sCCYRArARAJ9YpNCc9iEMRPqnv9oSA90KsB1C0gCeODmL
uXbBnGwRKsF1u4xnbXnEwpE=
=2ZLR
-----END PGP SIGNATURE-----




More information about the kde-core-devel mailing list