Review Request 119005: Make desktoptojson include all values, not just the translated ones

David Faure faure at kde.org
Tue Jul 1 08:51:35 UTC 2014



> On June 30, 2014, 2:31 p.m., David Faure wrote:
> > This seems wrong to me. QSettings is not a desktop file parser. It will get escaping wrong, compared to what the desktop entry spec says.
> > 
> > Isn't the long term solution to write .json files directly anyway?
> 
> Alexander Richardson wrote:
>     Okay, after reading the desktop file spec it seems that this doesn't make too much sense since there are some differences to INI files.
>     All the plugin .desktop files I looked at don't use comments (# vs ;) so nothing broke here.
>     
>     However, I still think this tool should be in kcoreaddons since e.g. KPluginLoader is there. Would it make sense to write a QtCore only replacement that doesn't use kconfig or is this a waste of time?
> 
> Alexander Richardson wrote:
>     After creating a test case I noticed that KDesktopFile/KConfig also doesn't quite adhere to the desktop file spec.
>     Lists should be separated with a semicolon and use \; to include semicolons. However, it treats e.g. "X-KDE-PluginInfo-Depends=foo;bar;escaped\;semicolon" as a single string.
>     KConfig uses a comma as a separator instead.
>     
>     Test case: http://paste.kde.org/pzvguaf91

The desktop entry spec mandates ';' for very specific entries (Categories, MimeTypes, etc.)
X-KDE-* is our own, we can use whatever we want for these - and we use comma.
KConfig/KDesktopFile has readXdgListEntry() for ';'-separated lists (while readEntry<QStringList> is for comma-separated lists).


- David


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


On June 29, 2014, 5:59 p.m., Alexander Richardson wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/119005/
> -----------------------------------------------------------
> 
> (Updated June 29, 2014, 5:59 p.m.)
> 
> 
> Review request for KDE Frameworks and Sebastian Kügler.
> 
> 
> Repository: kservice
> 
> 
> Description
> -------
> 
> It now uses QSettings to read the desktop file instead of kconfig which
> means that this tool could move to kcoreaddons.
> 
> 
> Diffs
> -----
> 
>   src/desktoptojson/CMakeLists.txt 134dabe62ca051eea26631aedc72b108e1b60444 
>   src/desktoptojson/kconfigtojson.cpp 5c0d751f05503e471ed9c49efc51bfdd22774be9 
> 
> Diff: https://git.reviewboard.kde.org/r/119005/diff/
> 
> 
> Testing
> -------
> 
> now includes all fields (Comment + Comment[de] + Comment[...], etc)
> 
> I guess desktoptojson could be move to kcoreaddons for 5.1 and have kservice_desktop_to_json forward to a new kcoreaddons_desktop_to_json for cmake source compatibility
> 
> 
> Thanks,
> 
> Alexander Richardson
> 
>

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


More information about the Kde-frameworks-devel mailing list