[Kde-pim] I'm new and I have a patch [update]
Till Adam
till at kdab.net
Mon Feb 4 18:34:57 GMT 2008
On Monday 04 February 2008 19:22:43 David Faure wrote:
> On Monday 04 February 2008, Mischael Schill wrote:
> > Am Montag 04 Februar 2008 14:23:53 schrieb David Faure:
> > > On Saturday 02 February 2008, Mischael Schill wrote:
> > > > Hello again
> > > > I updated my patch using QSize instead of two int's and
> > > > making the saveSize()-Slot private.
> > >
> > > This should use KDialog::saveDialogSize and
> > > KDialog::restoreDialogSize instead.
> >
> > Thanks for the advice. Here's the new patch.
>
> I expected the code to become much shorter :)
>
> > + KSharedConfigPtr config = KSharedConfig::openConfig();
> > + KConfigGroup group(config, "AboutDialog");
> > + restoreDialogSize(group);
>
> restoreDialogSize(KConfigGroup(KGlobal::config(), "AboutDialog"));
> or
> KConfigGroup group(KGlobal::config(), "AboutDialog");
> restoreDialogSize(group);
> if the first solution doesn't compile.
>
> +void AboutDialog::saveSize()
> +{
> + KSharedConfigPtr config = KSharedConfig::openConfig();
> + KConfigGroup group(config, "AboutDialog");
> + saveDialogSize(group);
> Same here.
>
> + group.sync();
> + config->sync();
> That's belt and suspenders :) One sync call is enough (I would choose
> group.sync()).
Does the sync make sense at all, here? Given that this is during application
close.
--
Till Adam
KDAB - platform independent software services
_______________________________________________
KDE PIM mailing list kde-pim at kde.org
https://mail.kde.org/mailman/listinfo/kde-pim
KDE PIM home page at http://pim.kde.org/
More information about the kde-pim
mailing list