Summary:
this was implemented using a nested loop, which is simply not viable
because nested looping may work on inconsistent object states and cause
crashes all over the place. furthermore sleeping probably has no real use
case as there isn't anything you could be sleeping for
prevent any future problems by making the API method do nothing and instead
print a warning about it being deprecated.
should be removed when moving over to kf6
Test Plan: prints warning when sleeping
Reviewers: davidedmundson, mart
Reviewed By: davidedmundson
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D22070
Summary:
the sleep is implemented with a nested event loop which may result in
segfaults when something in the new loop stack accesses objects from the
original loop stack that are presently in a bad state because they were
not meant to be accessed (and only can because of the nesting).
to aid in debugging let's leave a trace of the fact that sleep was used
when in fact, using sleep is super risky.
Test Plan: warning gets printed when sleeping
Reviewers: mart
Reviewed By: mart
Subscribers: davidedmundson, plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D21895
I got "#define HAVE_X11 TRUE" and errors because of that where #if was
used.
This also obeys the logic that HAVE_X11 is set (in the toplevel
CMakeLists.txt) not only when X11_FOUND but also when XCB is found.
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:
Plasmashell literally never checks the X screen, but we expose it in
this scripting system.
This patch Hardcodes it to the values you'd have on a normal system.
The existing screenCount is unchanged and will still work.
Test Plan: compiles
Reviewers: #plasma, mart
Reviewed By: #plasma, mart
Subscribers: apol, plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D9174