[Kde-pim] korganizer doesn't save resources immediately when changed or deleted (bug 143511)
Jason 'vanRijn' Kasper
vr at movingparts.net
Tue Apr 3 02:29:39 BST 2007
On Monday 02 April 2007 20:57:50 Jason 'vanRijn' Kasper wrote:
> On Monday 02 April 2007 18:34:24 Reinhold Kainhofer wrote:
> > Am Dienstag, 3. April 2007 schrieb Jason 'vanRijn' Kasper:
> > > On Thursday 29 March 2007 07:10:19 Reinhold Kainhofer wrote:
> > > > Am Donnerstag, 29. März 2007 schrieb Cornelius Schumacher:
> > > > > On Thursday 29 March 2007 04:14, Reinhold Kainhofer wrote:
> > > > > > Am Donnerstag, 29. März 2007 schrieb Jason 'vanRijn' Kasper:
> > > > > > > I'll of course
> > > > > > > ask for permission to commit before I do, but do I have your
> > > > > > > agreement that this is the Right Thing To Do (TM)? =:)
> > > > > >
> > > > > > the current (default) interval of 10 minutes is really too long,
> > > > > > you are right. I would think that at most half a minute (or
> > > > > > something like 10 seconds) should be used (yes, the current API
> > > > > > doesn't support that) to make sure that not every part of a
> > > > > > larger change triggers its own saving.
> > > > >
> > > > > Can't we just use the SaveDelayed save policy from ResourceCached
> > > > > by default, which saves 15 seconds after something has changed.
> > > >
> > > > Ah, right, that would be a call to
> > > > void ResourceCached::setSavePolicy( int i )
> > > > with i=SaveDelayed in the constructor. I wonder why we don't use that
> > > > already,,,
Wooohoo!!! Here's the (admittedly comically trivial) patch. This adds 2
lines to ResourceLocal::init() (both constructors call init()). I've tested
the original problem with this patch in place and I do not see any data loss,
YAY! =;) Also, I do not see any slow-down at all (there is no noticeable UI
degradation), whereas with "touch ~/.kde/share/apps/korganizer/std.ics", I do
see a "blink".
Reinhold/Cornelius: may I please commit this to kdepim-3.5.5+ and
branches/KDE/3.5/kdepim/? I'll put in in trunk too, if need be, but I'm not
honestly sure what the state of the union is in trunk... I believe that with
this, bug#143511 can be closed.
Hm, should resourcelocaldir.cpp contain this same setSavePolicy line?
Index: libkcal/resourcelocal.cpp
===================================================================
--- libkcal/resourcelocal.cpp (revision 649082)
+++ libkcal/resourcelocal.cpp (working copy)
@@ -107,6 +107,8 @@
{
d = new ResourceLocal::Private;
+ setSavePolicy(SaveDelayed);
+
setType( "file" );
--
-[ Jason 'vanRijn' Kasper // http://movingparts.net ]-
-[ KDE PIM Developer // http://www.kde.org ]-
-[ bash fun -> :(){ :|:&};: // Numbers 6:22-26 ]-
_______________________________________________
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