Dataengnies
Aaron J. Seigo
aseigo at kde.org
Wed Aug 27 18:22:36 CEST 2008
On Wednesday 27 August 2008, Petri Damstén wrote:
> On Tuesday 26 August 2008 23:38:47 Aaron J. Seigo wrote:
> > and yes, if the engine is doing any sort of expensive work then the code
> > needs to protect against it being called while the async job is in
> > progreess.
>
> Yes, that's true.
>
> > doing async calls inside the DataEngine subclas itself is really not the
> > best way to do things. encapsulating it inside a DataContainer subclass
> > makes it waaaay easier to manage.
>
> This was new to me :-) Converted ExecutableEngine to use custom Container
> (attached). One problem. exec is called in constructor to start process for
> the first time. checkForUpdate is called when process finished but seems
> that m_queued is false and dataUpdated is not called. On second exec (first
> updateRequested signal, which comes after first timeout) it works:
you probably want to do:
emit dataUpdated(objectName(), data());
in ExecutableContainer::finished
> One other thing. If query() is run first for the DataEngine doing async
> calls it won't work, but I'm not sure if that is important. Applet writer
> does not have a way to know it (if engine is async or not), though.
yes; i think that's an edge case i'm not going to worry too much about at this
point =)
--
Aaron J. Seigo
humru othro a kohnu se
GPG Fingerprint: 8B8B 2209 0C6F 7C47 B1EA EE75 D6B7 2EB1 A7F1 DB43
KDE core developer sponsored by Trolltech
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part.
Url : http://mail.kde.org/pipermail/plasma-devel/attachments/20080827/45b2f755/attachment.sig
More information about the Plasma-devel
mailing list