[PATCH] Bugfixes for profiles and preloading.

David Faure faure at kde.org
Fri Dec 23 09:09:55 GMT 2005


On Wednesday 21 December 2005 16:22, Emanuele Tamponi wrote:
> Hello,
> I just completed a little patch.
> Because my explanation was very lenghtly and needed a lot of html (because I 
> pasted some code), I link here the webpage where I wrote the explanation.
> 
> The patch is the attached file, but you can download it also from the webpage:
> 
> 
> http://principe.homelinux.net/patch/

I get a timeout, so I can't read that page.

A few comments on the patch though:

 +  KonqMainWindowPrivate *dk;

KonqMainWindow is an application class, it doesn't need to preserve BC.
Please put any new member in the class itself, without using a private class and a d[k] pointer.

If I understand correctly, this autosaves window settings (size, toolbar positions etc.)
automatically into the profile.
This sounds fine... but the patch should avoid parsing the profile so many times.

+           KonqMainWindow::preloadedWindow()->xmlFile() == (new KConfig(path))->readEntry("XMLUIFile") )
This one is even a memory leak, the KConfig isn't deleted.

Maybe a solution is to let KonqMainWindow keep around a KConfig* pointing to the current profile.

Also I wonder why dk->autoSaveGroup is used for saving but not for loading.

Hmm, don't you have to remove the old code that read the window size from the profile?

Thanks for your contribution.

-- 
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 kfm-devel mailing list