D14536: [scripting] Port ScriptedEffects to QJSEngine

Fabian Vogt <[email protected]>
Newsgroups gmane.comp.kde.devel.kwin
Message-ID <[email protected]>
fvogt resigned from this revision.
fvogt added inline comments.

INLINE COMMENTS

> davidedmundson wrote in kwineffects.h:2230
> There are two types of role
> 
> GrabRole    which should be set to a pointer to the object
> 
> For a Scripted effect:
> 
>   w.setData(Effect.WindowClosedGrabRole, effect);
> 
> resulted in QVariant(QObject*, ScriptedEffectWithDebugSpy(0x7f7f60006190))
> 
> which looks fine
> 
> The other roles (such as WindowForceBackgroundContrastRole) should be a boolean
> 
>   w.setData(Effect.WindowForceBackgroundContrastRole, true);
> 
> which resulted in QVariant(bool, true)
> 
> which also looks fine
> 
> ---
> 
> Obviously one can do something stupid like setData(["asdfasf", 2]) which results in a QJSValue  but unboxing won't help.

Hm, so it is affected. If a new role with a QStringList gets instroduced (or even a QVariantList) it might stop working (or behave unexpectedly).

Currently it shouldn't cause any issues though.

REPOSITORY
  R108 KWin

REVISION DETAIL
  https://phabricator.kde.org/D14536

To: davidedmundson, #kwin, mart
Cc: fvogt, zzag, kwin, mkulinski, ragreen, jackyalcine, Pitel, iodelay, bwowk, ZrenBot, lesliezhai, ali-mohamed, hardening, jensreuterberg, abetts, sebas, apol, mart
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.