KMimeTypeChooser

David Faure faure at kde.org
Sun Apr 11 16:58:53 BST 2004


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.

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.

Other than that, looks good.

-- 
David Faure, faure at kde.org, sponsored by Trolltech to work on KDE,
Konqueror (http://www.konqueror.org), and KOffice (http://www.koffice.org).




More information about the kde-core-devel mailing list