[KDesktopFile] Add a property and propertyKde functions to access custom properties
AbandonedPublic

Authored by meven on Oct 28 2019, 1:22 PM.

Details

Reviewers
apol
Group Reviewers
Frameworks
Summary

Needed to be able to use propertyKde("NoGlobalShortcut", false) instead of noDisplay() as in D24956
Similar to KService::property but uses a default value.

Test Plan

ctest

Diff Detail

Repository
R237 KConfig
Branch
master
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 18252
Build 18270: arc lint + arc unit
meven created this revision.Oct 28 2019, 1:22 PM
Restricted Application added a project: Frameworks. · View Herald TranscriptOct 28 2019, 1:22 PM
Restricted Application added a subscriber: kde-frameworks-devel. · View Herald Transcript
meven requested review of this revision.Oct 28 2019, 1:22 PM
meven added a reviewer: apol.Oct 28 2019, 1:23 PM
apol added a comment.Oct 28 2019, 4:56 PM

Hi Meven, I guess I didn't make myself clear, sorry about that. This is not what I meant.

What I meant was here D24956 you can query the desktop entry directly, we don't need to expose access to it.

In D25003#555366, @apol wrote:

Hi Meven, I guess I didn't make myself clear, sorry about that. This is not what I meant.

What I meant was here D24956 you can query the desktop entry directly, we don't need to expose access to it.

Maybe I am missing something again.
But my reasoning was that KDesktopFile didn't allow to access arbitrary properties like KService does.
And the freedesktop specification as defined such defined custom properties https://standards.freedesktop.org/desktop-entry-spec/desktop-entry-spec-latest.html "Extending the format".
So I meant to fill this gap as it would be of use in D24956 since KDesktopFile is `This class implements KDE's support for the freedesktop.org Desktop Entry Spec.
`
Unless I would use KService in D24956 but semantically KDesktopFile is what I need, on mimetype business here and using KService would add a dependency to KGlobalAcccel.

KDesktopFile::desktopGroup() just gives you a KConfigGroup of the ´[Desktop Entry]` section at which point you can read whatever you want

meven abandoned this revision.Oct 31 2019, 11:24 AM

KDesktopFile::desktopGroup() just gives you a KConfigGroup of the ´[Desktop Entry]` section at which point you can read whatever you want

Missed this, covers my need.