QScriptEngine is deprecated for years and suffers bitrot.
Plasma hit one super major bug with it in 5.11.0 and has now ported
Main porting notes:
- creating low level functions no longer exists The old global functions are exposed on the ScriptedEffect instance
and then the QJSValue wrappers of the globalObject are modified to
trampoline the methods at a wrapper level.
- We can then use QJSEngine to automatically do argument error checking
rather than unmarshalling a QJSValue manually which significantly
reduces a lot of code.
- We can't make FPX2 a native type, so these are QJSValue args and
Long term I want overloads for animate that take int/QSize/QPoint which
are native JS types, but that might be an API break.
- One can no longer throw errors from C++, instead you can return an
error object which will then be thrown when we're back in JS space
- QList<QObjectDerived*> is not understood by QJSEngine. Converting to
QList<QObject*> was the only sane solution I found.