Review Request 122541: KService: fix regression in stringlist properties handling
Albert Astals Cid
aacid at kde.org
Thu Feb 12 13:43:32 UTC 2015
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/122541/#review75919
-----------------------------------------------------------
unittest?
- Albert Astals Cid
On feb. 12, 2015, 1:27 p.m., Daniel Vrátil wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/122541/
> -----------------------------------------------------------
>
> (Updated feb. 12, 2015, 1:27 p.m.)
>
>
> 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/34284b3f/attachment-0001.html>
More information about the Kde-frameworks-devel
mailing list