[Kde-pim] Help with crash from CalDav

Kevin Krammer krammer at kde.org
Wed Oct 3 16:29:35 BST 2012


On Monday, 2012-10-01, David Faure wrote:
> On Sunday 30 September 2012 12:24:13 Allen Winter wrote:
> > What it be the worst thing in the world to not assert then?
> > This is just "one of those things" that is nearly impossible to find.
> > 
> > maybe just a kWarning?
> 
> IRC we fixed rather important bugs in the imap resource, from such asserts.
> 
> This is just "one of those things" that are better caught early than
> late... you get other even weirder bugs if you don't respect the
> resourcebase contract.
> 
> My suggestion for a long-term solution to this would be that ResourceBase
> should rather call factory methods that return jobs (created by the
> resource, with its own stuff added in a subclass), rather than this
> procedural "start this", "ok I'm done". Then we could track the lifetime
> of these jobs, and have a single list of jobs (rather than the
> resourcebase having some notion of the current job, and the resource
> having another notion of the current job).

I mostly agree.

I tried to model that with the FileStore API, i.e. the actual resource just 
gets a job from the FileStore implementation and handles its signals.
However, I am not that satisfied with the factory approach used there (requires 
to either to implement all jobs or have "empty" jobs for all).
I am currently leaning more towards "final" job classes and delegating the 
processing through Acyclic visitors [1].

In any case we could still offer a simple resource base class for really 
trivial resources.

Cheers,
Kevin

[1] http://www.objectmentor.com/resources/articles/acv.pdf
-- 
Kevin Krammer, KDE developer, xdg-utils developer
KDE user support, developer mentoring
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 190 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kde-pim/attachments/20121003/6df6978d/attachment.sig>
-------------- next part --------------
_______________________________________________
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