Review Request 111689: desktoptojson -- convert .desktop files to .json for plugin metadata
Milian Wolff
mail at milianw.de
Thu Jul 25 18:02:45 UTC 2013
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/111689/#review36503
-----------------------------------------------------------
staging/kservice/tools/desktoptojson/kconfigtojson.h
<http://git.reviewboard.kde.org/r/111689/#comment26950>
If you stick to using a dptr (doesn't make much sense, but well), use a QScopedPointer. This should become the standard way to handle this pattern.
staging/kservice/tools/desktoptojson/kconfigtojson.cpp
<http://git.reviewboard.kde.org/r/111689/#comment26953>
why this function at all? it looks like a poor-man's qDebug/kDebug?
If you want to ensure the output is always readable, I suggest adding a global/class-local QTextStream out(stdout); which you then use like qDebug/kDebug.
staging/kservice/tools/desktoptojson/kconfigtojson.cpp
<http://git.reviewboard.kde.org/r/111689/#comment26955>
here and below: These strings should use QStringLiteral, and be shared wherever possible.
staging/kservice/tools/desktoptojson/kconfigtojson.cpp
<http://git.reviewboard.kde.org/r/111689/#comment26954>
imo, just run d->parser->process(*this) directly and run quit() afterwards.
staging/kservice/tools/desktoptojson/kconfigtojson.cpp
<http://git.reviewboard.kde.org/r/111689/#comment26949>
this and the one below should probably be static.
staging/kservice/tools/desktoptojson/kconfigtojson.cpp
<http://git.reviewboard.kde.org/r/111689/#comment26951>
why not directly file.write(jdoc.toJson())?
staging/kservice/tools/desktoptojson/kconfigtojson.cpp
<http://git.reviewboard.kde.org/r/111689/#comment26952>
will be done automatically when the function's scope is left.
- Milian Wolff
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/d92b14bb/attachment-0001.html>
More information about the Kde-frameworks-devel
mailing list