major overhauls in plasma declarative for dataengines

Marco Martin notmart at gmail.com
Fri Sep 23 13:12:12 UTC 2011


On Friday 23 September 2011, Aaron J. Seigo wrote:
> 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.

ok, if got a bit more efficient is ok (and has a nice symmetry with 
keyrolefilter, name that as you note is not so grand)

> 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 ...

on the other hand if it's after, how does PA1 promise a platform stability to 
develop 3rd party stuff?

if is clear that after pa1 there can be api changes (and if is not too 
counterproductive) those changes can be done immediately after

a thing that would be nice, would be that even if in plasma2 dataengine would 
be kindof compatible and datamodel still available without (big) api changes, 
it could be made not necessary anymore by some changes in 
dataengine/datasource...

don't have clear ideas exactly "how" but i feel the need to remove this extra 
step (and would solve the problem of the confusing api from the root;)

> 
> 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.

there is something in
http://techbase.kde.org/Development/Tutorials/Plasma/QML/API#DataSource

so, would need an expansion in a page of its own..

-- 
Marco Martin


More information about the Plasma-devel mailing list