Port Plasma Desktop Scripting to QJSEngine

Authored by mart on Jun 8 2018, 2:13 PM.

Description

Port Plasma Desktop Scripting to QJSEngine

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

Details

Committed
martJun 8 2018, 2:14 PM
Reviewer
Plasma
Differential Revision
D13112: Port Plasma Desktop Scripting to QJSEngine
Parents
R120:f9ba4704d2b3: correctly wrap applet and containment
Branches
Unknown
Tags
Unknown
References
refs/backups/branch-mart/QJSEngineScripting-1528467375