KConfigGroup automatic sync

Sebastian Trüg sebastian at trueg.de
Wed Feb 18 19:02:13 GMT 2009


On Wednesday 18 February 2009 17:26:38 Stephan Kulow wrote:
> Am Mittwoch 18 Februar 2009 schrieb Sebastian Trüg:
> > On Wednesday 18 February 2009 17:11:48 Stephan Kulow wrote:
> > > 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
> >
> > Ok, so code like the following cannot be used then:
> >
> > config->group("my group").writeEntry( "foobar", "hello world" );
>
> Sure it can be used. But it shouldn't sync.
>
> Greetings, Stephan

ok then, techbase and KConfigGroup apidox updated.




More information about the kde-core-devel mailing list