kconfig sync at exit
Aaron J. Seigo
aseigo at kde.org
Wed Jun 20 22:10:42 BST 2007
On Wednesday 20 June 2007, Thomas Zander wrote:
> On Wednesday 20 June 2007 21:04:53 Aaron J. Seigo wrote:
> > On Wednesday 20 June 2007, Thomas Zander wrote:
> > > I was surprised to see that I had to manually call 'config->sync()'
> > > afterwards since none of my changes (not even the new group) appeared
> > > in the config due to the app quitting shortly after.
> >
> > this is a regression somewhere... KConfig::~KConfig() does indeed call
> > sync(), but that relies on the config being marked dirty. so somewhere
> > ... that's not happening.
> >
> > are you using kconfiggroup or directly callin kconfig{base} methods?
>
> KSharedConfigPtr config = KGlobal::config();
> KConfigGroup interface = config->group( "Interface" );
> interface.writeEntry( "Zoom", m_zoom );
> config->sync(); // do we need this line?
>
> I'm not aware of any other way to do it ;)
hm.. i just test this here locally with a small test app and it works as
expected without a call to sync() ... perhaps ossi is right and your app is
chrashing on exit?
--
Aaron J. Seigo
humru othro a kohnu se
GPG Fingerprint: 8B8B 2209 0C6F 7C47 B1EA EE75 D6B7 2EB1 A7F1 DB43
Full time KDE developer sponsored by Trolltech (http://www.trolltech.com)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20070620/2e444ed7/attachment.sig>
More information about the kde-core-devel
mailing list