Summary:
support args in applet creation with an optional argument to
containment::addWidget
scripts not using it will continue to work as before
Test Plan:
arguments get understood byt the created applet
applets can still be created without arguments
Reviewers: #plasma, broulik
Reviewed By: #plasma, broulik
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D22652
Summary:
Port plasma desktop scripting to qjsengine, removing every trace of QScript from plasma-workspace.
The scripting is 100% API compatible.
the bindings are partly done on the javascript part as some things are only possible there and not on the QJSEngine part:
* setting AppInterface as the globalobject's __proto__ with property getters that are evaluated every time
* setting functions that act as constructors (using newQMetaObject gives way more complex and uglier c++ code in Containment, as the scriptengine is not immediately accessible)
* a QRectF wrapper which exposes all properties and methods that were exposed in the previous implementation
Test Plan:
* some manual api test from the interactive console
* tested both from the desktop console and first start with some pretty complex layouts from lnf packages (the default one, netrunner, united, elpas)
* tested every property/methos of the qrectf wrapper
Reviewers: #plasma, davidedmundson
Reviewed By: #plasma, davidedmundson
Subscribers: davidedmundson, plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D13112
the api containment.name was incorrect and broken,
(using it it actually breaks the whole layout since
breaks the containment->activity association)
in order to make it coherent with the other activity
related api, add global functions activityName
and setActivityName
it's not very object oriented but is coherent with
the other api already in place
(as there isn't an "Activity" class binding)