Plasma 2 DataEngine & QML bindings
Marco Martin
notmart at gmail.com
Tue Jul 2 06:18:54 UTC 2013
On Tuesday 02 July 2013 03:18:37 Sebastian Kügler wrote:
> Converting it to a QVariantMap instead makes it work from QML, but it's not
> actually what we want to do here. Or is it?
yeah, qvariantmap is less efficient (since it always orders the keys), but
qjsengine (therefore qqmlengine) only understand qvariantmap, so looks like
we'll have to use it :/
> There's some qscriptvalue magic that I don't understand completely in
> dataenginebindings_p.h, is this the necessary glue to do the conversion
> automatically (and more efficiently)?
that is what it was doing before to make it understand qvarianthash, but is
umportable :/
qjsvalue is *almost* identical to qscriptvalue, except you can't define custom
conversion operators (like we were doing there) or custom constructors, so is
not possible to register any new type besides those that are done internally
with qv8engine (doesn't even make sense to try to patch it since they are
porting it away from qv8engine to a new engine, so will have to see if the
situation will improve with the new one)
--
Marco Martin
More information about the Plasma-devel
mailing list