Re: Fun with Akonadi Dataeng

2009-02-25 Thread David Baron
Any progress on the akonadi engine? (I have been offline a few days because I 
l lost my geforce).

Last svn I took crashed the engine-explorer and my applet so I doubt it is my 
code. Could it be that dataUpdated() was being exercised with invalid or null 
data? Since the receives Plasma::DataEngine::Data&, how would one check this 
to be safe?
___
Plasma-devel mailing list
Plasma-devel@kde.org
https://mail.kde.org/mailman/listinfo/plasma-devel


Re: Fun with Akonadi Dataeng

2009-02-26 Thread Sebastian Kügler
On Wednesday 25 February 2009 16:56:11 David Baron wrote:
> Any progress on the akonadi engine? (I have been offline a few days because
> I l lost my geforce).
>
> Last svn I took crashed the engine-explorer and my applet so I doubt it is
> my code. Could it be that dataUpdated() was being exercised with invalid or
> null data? Since the receives Plasma::DataEngine::Data&, how would one
> check this to be safe?

Yes, for async requests, the data set passed can be empty, that's actually 
part of the API. Just make sure you don't trust the data passed in, but check 
it first.
-- 
sebas

 http://www.kde.org | http://vizZzion.org |  GPG Key ID: 9119 0EF9 




signature.asc
Description: This is a digitally signed message part.
___
Plasma-devel mailing list
Plasma-devel@kde.org
https://mail.kde.org/mailman/listinfo/plasma-devel


Re: Fun with Akonadi Dataeng

2009-02-28 Thread Sebastian Kügler
Let's keep it on-list, please.

On Saturday 28 February 2009 20:09:38 David Baron wrote:
> On Friday 27 February 2009 15:50:55 you wrote:
> > On Friday 27 February 2009 08:30:28 David Baron wrote:
> > > On Thursday 26 February 2009 15:26:55 you wrote:
> > >
> > >
> > > An empty QHash has no keys, this should not crash anything.
> > > A null QHash would crash checking for keys. Same with a null as opposed
> > > to an empty QString checking for the data name.
> > >
> > > These are not pointers but references or values. How do I check for
> > > simple validity?
> >
> > QHash::isEmpty() should work.
> >
> > I'm not getting what the exact problem is. Can you show me the code
> > that's actually crashing? (I didn't notice any crashes so far, I'd be
> > interested what you're doing differently.)
>
> QHash::isEmpty() depends on there actaully being a QHash. Both my applet
> and the engine  explorer probably test the QString data source name first.
> What if this does not present real data ("" is perfectly fine).
>
> Since both the explorer and the applet crash after all the contacts have
> been loaded as evidenced by the copius debug prints, I suspect a
> dataUpdated call with bogus data, this is the version after you added the
> empty data call (could this be the culprit?) and async operation of the
> first datasources returns.

Can you please show me the code? This way it's like fishing in the dark (does 
this translate?). I'm much better at understanding if I can compare actual 
code ...
-- 
sebas

 http://www.kde.org | http://vizZzion.org |  GPG Key ID: 9119 0EF9 



signature.asc
Description: This is a digitally signed message part.
___
Plasma-devel mailing list
Plasma-devel@kde.org
https://mail.kde.org/mailman/listinfo/plasma-devel