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
signature.asc
Description: This is a digitally signed message part.
_______________________________________________ Plasma-devel mailing list Plasma-devel@kde.org https://mail.kde.org/mailman/listinfo/plasma-devel