> 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 > >
_______________________________________________ Kde-frameworks-devel mailing list Kde-frameworks-devel@kde.org https://mail.kde.org/mailman/listinfo/kde-frameworks-devel