Changes in QML scriptengine

Marco Martin notmart at gmail.com
Wed Feb 13 14:37:32 UTC 2013


On Wednesday 13 February 2013, Marco Martin wrote:
> Hi all,
> 
> since i'm going forward with the porting of the qml scriptengine to
> plasma2, i got to think about the current implementation and how to
> implement missing pieces (that leads to what to change)

And all of this naturally leads to a second part:

Then, a thing that i still not solved completely: in this declarative 
appletscript rules all scenario, how to do applets that are hybrid c++?
I would like to conserve this for two reasons: limit the proliferation of 
imports and to limit porting efforts since many of our qml applets are partly 
c++ already.

I tought about this: the applet is still a c++ plugin that subclasses Applet* 
and just adds properties/signals, eventually registers types etc, tough the 
declarative appletscript is still loaded, and the package named as the plugin 
is loaded as well.

the scriptengine then looks if the applet * is a custom subclass, if so 
registers it as plasmoid.extension or something like that, that would be 
accessible (it would even allow the plasmoid to run with limited functionality 
if the applet plugin is not loaded)

proprieties and invokables are already removed from Applet* so that's fine, 
but slots and signals would still be accessible and that's bad(tm)

another option is either another plugin system (not good, and not many 
advantages to just do import at ths point) or having in the applet subclass a 
QObject property extension that will be what gets implemented, but this looks 
ugly as well.

-- 
Marco Martin


More information about the Plasma-devel mailing list