Review Request 111689: desktoptojson -- convert .desktop files to .json for plugin metadata
Milian Wolff
mail at milianw.de
Sat Aug 3 22:45:06 UTC 2013
> On Aug. 2, 2013, 9:08 a.m., David Faure wrote:
> > staging/kservice/tools/desktoptojson/kconfigtojson.h, line 31
> > <http://git.reviewboard.kde.org/r/111689/diff/8/?file=175878#file175878line31>
> >
> > I don't like file-static QStrings (global objects), and even less in headers (it creates an unused variable in any user of the header).
> >
> > My suggestion: define the command-line options in the KConfigToJson constructor or runMain().
> >
> > To go even further and avoid the need for shared strings completely: store the two QCommandLineOptions as members of the class, and pass them to isSet() and value(), instead of strings.
> >
What's wrong with file-static QStrings that come out of a QStringLiteral? This can/should imo be seen similar to a static const int or similar. If we could rely on C++11 we'd write it as "constexpr QString foo = QStringLiteral("bar");" after all, no?
- Milian
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/111689/#review36960
-----------------------------------------------------------
On Aug. 3, 2013, 10:07 p.m., Sebastian Kügler wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/111689/
> -----------------------------------------------------------
>
> (Updated Aug. 3, 2013, 10:07 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/src/desktoptojson/CMakeLists.txt PRE-CREATION
> staging/kservice/src/desktoptojson/kconfigtojson.h PRE-CREATION
> staging/kservice/src/desktoptojson/kconfigtojson.cpp PRE-CREATION
> staging/kservice/src/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/20130803/2365182f/attachment.html>
More information about the Kde-frameworks-devel
mailing list