Review Request 111689: desktoptojson -- convert .desktop files to .json for plugin metadata

Sune Vuorela kde at pusling.com
Thu Jul 25 17:13:53 UTC 2013


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/111689/#review36501
-----------------------------------------------------------



staging/kservice/tools/desktoptojson/kconfigtojson.h
<http://git.reviewboard.kde.org/r/111689/#comment26943>

    No need to have it inherit anything



staging/kservice/tools/desktoptojson/kconfigtojson.cpp
<http://git.reviewboard.kde.org/r/111689/#comment26946>

    maybe qPrintable(msg) instead



staging/kservice/tools/desktoptojson/kconfigtojson.cpp
<http://git.reviewboard.kde.org/r/111689/#comment26945>

    As such there is no need for a d-pointer, but it also doesn't hurt.



staging/kservice/tools/desktoptojson/kconfigtojson.cpp
<http://git.reviewboard.kde.org/r/111689/#comment26944>

    Timer usage could be skipped with no eventloop running



staging/kservice/tools/desktoptojson/main.cpp
<http://git.reviewboard.kde.org/r/111689/#comment26940>

    I don't think you need to 'new' it here. just let the scoping handle the deletion



staging/kservice/tools/desktoptojson/main.cpp
<http://git.reviewboard.kde.org/r/111689/#comment26941>

    Just do it as a QCoreApplication first and then create a KConfigToJson afterwards



staging/kservice/tools/desktoptojson/main.cpp
<http://git.reviewboard.kde.org/r/111689/#comment26942>

    and just return kconfigtojson.runMain(); here


For inspiration for doing simple command line tools, you could also take a look at https://codereview.qt-project.org/#change,60560,patchset=5 which has a simpler 'top down' structure which is how CLI-apps usually are.

- Sune Vuorela


On July 25, 2013, 4:10 p.m., Sebastian Kügler wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/111689/
> -----------------------------------------------------------
> 
> (Updated July 25, 2013, 4:10 p.m.)
> 
> 
> Review request for KDE Frameworks and David Faure.
> 
> 
> Description
> -------
> 
> Small program which takes a .desktop file and converts it to json. This is useful to convert plugins which have their metadata in .desktop files (i.e. all KDE plugins) to Qt's new plugin system.
> 
> 
> Diffs
> -----
> 
>   staging/kservice/tools/CMakeLists.txt PRE-CREATION 
>   staging/kservice/tools/desktoptojson/CMakeLists.txt PRE-CREATION 
>   staging/kservice/tools/desktoptojson/kconfigtojson.h PRE-CREATION 
>   staging/kservice/tools/desktoptojson/kconfigtojson.cpp PRE-CREATION 
>   staging/kservice/tools/desktoptojson/main.cpp PRE-CREATION 
> 
> Diff: http://git.reviewboard.kde.org/r/111689/diff/
> 
> 
> Testing
> -------
> 
> Converted metadata of several plugins and used them from QPluginLoader -- works.
> 
> 
> Thanks,
> 
> Sebastian Kügler
> 
>

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


More information about the Kde-frameworks-devel mailing list