Diffusion KWin 3332b32101d7

[scripting] Fix effect.animate() curve argument being actually used

Authored by davidedmundson on Aug 7 2018, 8:32 PM.


[scripting] Fix effect.animate() curve argument being actually used

One cannot use a non metatype frrom an external class inside an
invokable. https://bugreports.qt.io/browse/QTBUG-58454

End result is the script engine arguments wouldn't match up and MOC
would just use the default value.

As far as I can tell this has been broken for 6 years.
The global animate method that unboxes a QJSValue as an object is
No shipped kwin effect actually used it.

To some extent we didn't even actually want to enforce the enum as we
also accept custom value of ScriptedEffect::GuassianCurve, so it has
been switched for an int.

Test Plan: Unit test

Reviewers: KWin, broulik

Reviewed By: broulik

Subscribers: kwin

Tags: KWin

Differential Revision: https://phabricator.kde.org/D14669