Review Request 111689: desktoptojson -- convert .desktop files to .json for plugin metadata
Milian Wolff
mail at milianw.de
Thu Aug 1 18:14:38 UTC 2013
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/111689/#review36933
-----------------------------------------------------------
nearly there! :)
staging/kservice/tools/desktoptojson/kconfigtojson.h
<http://git.reviewboard.kde.org/r/111689/#comment27241>
this is not being used here, QString include should be enough I think.
staging/kservice/tools/desktoptojson/kconfigtojson.h
<http://git.reviewboard.kde.org/r/111689/#comment27244>
is this the coding style of KDELibs?
class Foo
{
public:
Foo();
};
I assumed this is it:
class Foo
{
public:
Foo();
};
But the coding style does not tell which one it is. Maybe David Faure or so should say what is preferred.
staging/kservice/tools/desktoptojson/kconfigtojson.h
<http://git.reviewboard.kde.org/r/111689/#comment27242>
no need for virtual, actually no need for the dtor at all.
staging/kservice/tools/desktoptojson/kconfigtojson.cpp
<http://git.reviewboard.kde.org/r/111689/#comment27243>
then don't pass them along at all.
staging/kservice/tools/desktoptojson/kconfigtojson.cpp
<http://git.reviewboard.kde.org/r/111689/#comment27249>
just do return convert(...);
staging/kservice/tools/desktoptojson/kconfigtojson.cpp
<http://git.reviewboard.kde.org/r/111689/#comment27247>
same as below, check for the invalidity first, then return early. move the rest out of the conditional
staging/kservice/tools/desktoptojson/kconfigtojson.cpp
<http://git.reviewboard.kde.org/r/111689/#comment27245>
personally, I prefer to reduce the conditional clutter by doing things like this:
if (...) {
var = asdf();
if (!valid(var)) {
return false;
}
do_stuff();
}
staging/kservice/tools/desktoptojson/kconfigtojson.cpp
<http://git.reviewboard.kde.org/r/111689/#comment27246>
merge with above to else if?
- Milian Wolff
On Aug. 1, 2013, 6:03 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. 1, 2013, 6:03 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/20130801/00b3a07e/attachment-0001.html>
More information about the Kde-frameworks-devel
mailing list