Review Request 124066: Recognize X-KDE-FormFactor as stringlist

Sebastian Kügler sebas at kde.org
Mon Jul 6 08:51:30 UTC 2015



> On July 3, 2015, 9:15 p.m., Alexander Potashev wrote:
> > Why don't we store plugin metadata in JSON files? Look how they're used for KDevelop: https://svn.reviewboard.kde.org/r/7126/
> > 
> > I'm afraid that if we keep this patch and it gets released, but then we realize that X-KDE-FormFactor is not necessary in .desktop (e.g. we only have it in plugins that all use .json), afterwards we'll have to support X-KDE-FormFactor in kcoreaddons until the end of the KF5.x series. 5.12 is tagging tomorrow ;)

We do store plugin metadata in JSON files. This review has API to read the FormFactors key from JSON metadata. 

In addition, it allows to read the X-KDE-FormFactors key from .desktop files. The latter is needed for backwards compatibility (not all plugins use JSON exclusively as some apps still rely on KService).

Also, this review is not just about plugins, but about all kinds of cases where KPluginMetaData can be used, for example for installed applications (.desktop files in /usr/share/applications, for example).


- Sebastian


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


On June 29, 2015, 10:44 p.m., Sebastian Kügler wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/124066/
> -----------------------------------------------------------
> 
> (Updated June 29, 2015, 10:44 p.m.)
> 
> 
> Review request for KDE Frameworks, Alex Richardson and David Faure.
> 
> 
> Repository: kcoreaddons
> 
> 
> Description
> -------
> 
> This patch adds X-KDE-FormFactor to the keys recognized as stringlists.
> 
> We would like to see this to go in to allow us to filter plugins (KCMs for example) by form factor, so we only display UI plugins that are suitable for a given target device.
> 
> The idea is that plugins indicate which form factor (for example media center, tablet, desktop, etc...) they're suitable for, and the "host application" filters based on these.
> 
> If this approach is deemed valid, I'd be happy to add convenience API to KPluginMetaData, i.e. QStringList KPluginMetaData::formFactor(). This patch would be the minimal implementation we'd need.
> 
> The naming of the key is of course open to better suggestions.
> 
> 
> Diffs
> -----
> 
>   autotests/data/fakeplugin.desktop 95152f6 
>   autotests/kpluginmetadatatest.cpp 231ac36 
>   src/lib/plugin/desktopfileparser.cpp b19da6b 
>   src/lib/plugin/kpluginmetadata.h 4572d36 
>   src/lib/plugin/kpluginmetadata.cpp eaaf0b9 
> 
> Diff: https://git.reviewboard.kde.org/r/124066/diff/
> 
> 
> Testing
> -------
> 
> added autotest, also implemented using this in the Plasma Active settings app as proof-of-concept, works like a charm.
> 
> 
> Thanks,
> 
> Sebastian Kügler
> 
>

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


More information about the Kde-frameworks-devel mailing list