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
Summary:
add global immutability/setImmutability in scripting
there was a locked property in containment, but
didn't make much sense as the lock/unlock state is
always global. a global function would be better.
containment.locked may also be changed to lock the corona instead
(doesn't seem reliable now) but should probably be deprecated.
Test Plan:
correctly locked nd unlocked widgets from the console.
i'm not sure wether allowing systemimmutable as is dangerous and not
easily reversible, but does have an use for first
time setup of kiosk environments
Reviewers: #plasma, davidedmundson
Reviewed By: #plasma, davidedmundson
Subscribers: davidedmundson, plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D5009
Summary:
- Serializing the desktop layout for current activity
- Support for different config groups
- Introducing the mechanism for the future API versioning
- Loading the desktop from the serialized data
- Added debugging output just for comparison with regular layout.js
- Splitting V1 scripting functions into a separate class and file
- Loading the panels
- Disabled the debugging output
Reviewers: #plasma, mart
Reviewed By: mart
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D2480
Summary:
We have a method to add an activity in plasma script, but
not to remove it. This patch fixes this situation.
Reviewers: garg, davidedmundson, mart
Reviewed By: davidedmundson, mart
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D2251
Summary:
There is a small time-window when Plasma's internal data
regarding activities is not synchronized with the internal
data of the KActivities library.
This leads to Plasma reporting a different list of activities
than the list of activities it has containments for.
This patch changes the activity list that the ScriptEngine reports
to be the one that Plasma knows about.
See: https://bugs.kde.org/show_bug.cgi?id=365606
Reviewers: #plasma, davidedmundson, sebas, mart
Reviewed By: mart
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D2187
Summary:
There is a small time-window when Plasma's internal data
regarding activities is not synchronized with the internal
data of the KActivities library.
This leads to Plasma reporting a different list of activities
than the list of activities it has containments for.
This patch changes the activity list that the ScriptEngine reports
to be the one that Plasma knows about.
See: https://bugs.kde.org/show_bug.cgi?id=365606
Reviewers: #plasma, davidedmundson, sebas, mart
Reviewed By: mart
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D2187
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)