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

Sebastian Kügler sebas at kde.org
Thu Jun 11 04:31:36 UTC 2015



> On June 11, 2015, 4:25 a.m., Bhushan Shah wrote:
> > +1
> > 
> > I was looking for similar API when implementing plasmoids in pmc. Not all plasmoids would support mediacenter containment, so they might need to tell somehow which formfactors are supported.. About naming, name it X-KDE-SupportedFormFactor maybe?
> > 
> > Also perhaps document what should be possible values of X-KDE-FormFactors somewhere?

Yes, mediacenter is one of the usecases. About the key naming, not sure what the "Supported" really adds, to me, it sounds clear enough as it is. It would definitely have to be the plural form (more than one formfactor is the whole point of this patch).

Possible values are freestyle by design, we don't know yet what formfactors we'll support in the future, and which application picks up what exactly. I agree that giving examples would make sense in the API docs perhaps. In my example, the --help of the active-settings application indicates which ones it supports explicitely. As it only checks if the "current formfactor" is in the list of supported formfactors, you can basically add "toaster" or "divecomputer" there if you want, and it won't break.


- Sebastian


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


On June 11, 2015, 4:16 a.m., Sebastian Kügler wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/124066/
> -----------------------------------------------------------
> 
> (Updated June 11, 2015, 4:16 a.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 
> 
> 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/20150611/9cf75852/attachment.html>


More information about the Kde-frameworks-devel mailing list