KConfigGroup automatic sync

Stephan Kulow coolo at kde.org
Wed Feb 18 16:11:48 GMT 2009


Am Mittwoch 18 Februar 2009 schrieb Sebastian TrĂ¼g:
> The techbase article on KConfig states that the KConfigGroup destructor
> will sync automatically:
>
> "We can also simply wait for the object to be destroyed, which triggers an
> automatic sync() if necessary."
>
> This is not the case. Question is: what is the preferred behaviour? Should
> it sync automatically or not? In the latter case, one would have to call
> sync whenever one uses a group for writing which is very annoying.

syncing is a very expensive operation and KConfigGroup an often created 
object, so definitely: change the article. KConfigBase destructors should sync 
though, no idea if they do atm.

Greetings, Stephan






More information about the kde-core-devel mailing list