Review Request 122541: KService: fix regression in stringlist properties handling

Daniel Vrátil dvratil at redhat.com
Thu Feb 12 13:27:27 UTC 2015


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/122541/
-----------------------------------------------------------

(Updated Feb. 12, 2015, 2:27 p.m.)


Status
------

This change has been discarded.


Review request for KDE Frameworks and Marco Martin.


Repository: kservice


Description
-------

Commit f724942 has introduced a regression in stringlist properties handling in KService's KPluginInfo. KPluginInfo::property() now tries to convert any `result` to QString (if the value is expected to be a string list) and split the string by "," or ";" to get a QStringList. This will fail when the `result` is already a QVariant(QStringList) (QPluginLoader and QJsonDocument handle JSON arrays correctly), because QVariant::toString() will return an empty string, so in the end the function returns empty list.

This patch enables the attempt to deserialize string list only when the `result` value returned from KPluginMetaData is also a string.


Diffs
-----

  src/services/kplugininfo.cpp 572f14b 

Diff: https://git.reviewboard.kde.org/r/122541/diff/


Testing
-------

KDevelop can load plugins again.


Thanks,

Daniel Vrátil

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20150212/1fd5b6a0/attachment.html>


More information about the Kde-frameworks-devel mailing list