Dataengnies
Petri Damstén
petri.damsten at gmail.com
Tue Aug 26 15:08:45 CEST 2008
Hi,
In DataEngine it's often convenient to do something like this:
bool Engine::updateSourceEvent(const QString &name)
{
setData(name, ...);
}
bool Engine::sourceRequestEvent(const QString &name)
{
setData(name, DataEngine::Data()); // if async
updateSourceEvent(name);
return true;
}
sourceRequestEvent & updateSourceEvent are called like this:
- connectSource() interval = 0 -> sourceRequestEvent called
- query() -> sourceRequestEvent called
- connectSource() interval > 0 -> sourceRequestEvent & updateSourceEvent
called
That means that in my example updateSourceEvent is called twice at start when
using the last method. This is bad especially when doing some async calls in
updateSourceEvent. Of course there could be some extra code to prevent his,
but is the updateSourceEvent call at start needed?
Petri
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part.
Url : http://mail.kde.org/pipermail/plasma-devel/attachments/20080826/d26ea86a/attachment.sig
More information about the Plasma-devel
mailing list