QML DataSource

Aaron J. Seigo aseigo at kde.org
Thu Oct 6 15:46:51 UTC 2011


On Thursday, October 6, 2011 20:46:14 Saurabh Sood wrote:
> quite get the point, where you said that when a source appears, it may
> not have all data in place.

DataEngines are asynchronous. there is no guarantee as to when the data will 
arrive from them, just that it will at some point in the future.

so imagine that there is a source called "kde.org" that represents the kde.org 
web page. the DataEngine may create that source (causing sourceAdded to be 
emited) and then begin fetching the web page. some time later, the http 
request returns with all the data and the DataEngine updates the "kde.org" 
source with that data (causing dataUpdated to be called).

just because a source exists does not mean that it will have had a chance to 
get all of its data. sourceAdded is there just to let you know a given source 
has appeared, not that it has accumulated data.

that is what dataUpdated is for.

-- 
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 Qt Development Frameworks
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20111006/8cd82825/attachment.sig>


More information about the Plasma-devel mailing list