D14822: Use QJSValue as method parameter type for the scripting interface
Fabian Vogt
noreply at phabricator.kde.org
Tue Aug 14 13:22:24 BST 2018
fvogt added a comment.
A different approach of fixing this is to do something like
if(value.userType() == qMetaTypeId<QJSValue>())
value = value.value<QJSValue>().toVariant();
in every function for every QVariant parameter. Advantages are that it's more obvious and the function's interface does not change.
Disadvantages are that it has more overhead and more lines of code.
REPOSITORY
R120 Plasma Workspace
REVISION DETAIL
https://phabricator.kde.org/D14822
To: fvogt, #plasma
Cc: anthonyfieroni, 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/85b77435/attachment.html>
More information about the Plasma-devel
mailing list