major overhauls in plasma declarative for dataengines

Aaron J. Seigo aseigo at kde.org
Fri Sep 23 12:41:32 UTC 2011


On Friday, September 23, 2011 13:31:59 Marco Martin wrote:
> > (Marco: i ended up putting the source filter back in),
>
> reason? ;)

it's used in SLC and given that i don't have #s for how light DataSource is, 
and how many lines it added to the QML, i looked if it was possible to re-add 
it in a way that was sensible.

the result is:

* the regular expression is (as with the key filter) created and cached in the 
setter method

* it is checked once in dataUpdated, which means that instead of having very 
complex if statements all over the place in there it's a lot cleaner and 
easier to read. 

i'm still uncomfortable with various aspects of the API. for instace, i wish 
that "keyFilter" was called "dataFilter" so that we'd have "sourceFilter" and 
"dataFilter". that's a lot easier to understand given that there are sources 
and data.

i still don't like "onNewData"; i'd much prefer to have onDataChanged pass in 
the source and data of the change, even if that is "non standard" for QML.

i just don't know if and when we could do such a disruptive change. at most, 
we'd have one opportunity to make these changes. certainly not before Plasma 
Active One is released ...

documenting HOW DataSource and DataModel work in QML is going to be critical. 
people just don't "get" it, and neither did i (at least not fully) until i 
read the C++ code behind it all. that is probably not a good sign. ;) some 
clear documentation would do wonders here. a "how to use DataEngines" tutorial 
is sorely needed for QML.

-- 
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/20110923/b070b367/attachment.sig>


More information about the Plasma-devel mailing list