D14822: Use QJSValue as method parameter type for the scripting interface

Fabian Vogt noreply at phabricator.kde.org
Tue Aug 14 10:52:07 BST 2018


fvogt created this revision.
fvogt added a reviewer: Plasma.
Herald added a project: Plasma.
fvogt requested review of this revision.

REVISION SUMMARY
  If a slot or Q_INVOKABLE has a QVariant as parameter and gets called
  from a QJSEngine's script, it receives a QJSValue wrapped as QVariant.
  To get a QVariant with the actual value wrapped, calling QJSValue::toVariant
  is necessary.
  
  I'm not entirely sure whether this is intentional behaviour of QJSEngine, but
  even if it's a bug we'll have to workaround it.
  
  BUG: 397338

TEST PLAN
  I have favorites in kickoff again.

REPOSITORY
  R120 Plasma Workspace

BRANCH
  master

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

AFFECTED FILES
  shell/scripting/applet.cpp
  shell/scripting/applet.h
  shell/scripting/configgroup.cpp
  shell/scripting/configgroup.h
  shell/scripting/scriptengine_v1.cpp

To: fvogt, #plasma
Cc: plasma-devel, ragreen, Pitel, ZrenBot, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, mart
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20180814/42eb9632/attachment-0001.html>


More information about the Plasma-devel mailing list