Review Request 125766: Changed the manual command line parsing to use QCommandLineParser.

David Faure faure at kde.org
Fri Oct 30 07:57:03 UTC 2015


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/125766/#review87724
-----------------------------------------------------------

Ship it!



src/kded.cpp (line 684)
<https://git.reviewboard.kde.org/r/125766/#comment60185>

    Yep, someone should contribute a QGuiApplication::disableSessionManagement()...



src/kded.cpp (line 687)
<https://git.reviewboard.kde.org/r/125766/#comment60186>

    this could move to setupAppInfo, or you could remove that separate method now that it's called only from one place. It just looks a bit inconsistent now.



src/kded.cpp 
<https://git.reviewboard.kde.org/r/125766/#comment60184>

    The reason the code was the way it was, was to only create a QCoreApplication rather than a QApplication when --check is called, since this was done at KDE startup where time matters and core-only is sufficient for this.
    
    This being said, I'm not sure --check is still used anywhere. I did some searching and I can't find where it's used (neither in kdelibs4+startkde4 or in KF5+startkde5).
    
    So I guess I'll forget about the --check optimization (we can keep it for compat but we don't have to make it super efficient then)


- David Faure


On Oct. 23, 2015, 5:58 p.m., Antonio Larrosa Jimenez wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/125766/
> -----------------------------------------------------------
> 
> (Updated Oct. 23, 2015, 5:58 p.m.)
> 
> 
> Review request for KDE Frameworks.
> 
> 
> Repository: kded
> 
> 
> Description
> -------
> 
> Changed the manual command line parsing to use QCommandLineParser instead of
> parsing it manually. Also, now kded5 --version and kded5 --help show the
> version information and help on options.
> 
> There's a new human readable text ("Check cache validity") that maybe
> should be inside i18n, but since kded doesn't user i18n at all and
> I wasn't sure it's desired to do so, I just left it untranslated.
> 
> Also, unset SESSION_MANAGER environment variable instead of setting it empty.
> This removes a warning from Qt when parsing the (wrong, empty)
> value of SESSION_MANAGER
> 
> 
> Diffs
> -----
> 
>   src/kded.cpp 6929d7d3f24d3556f1b227d5a9bfb5b02b1c295e 
> 
> Diff: https://git.reviewboard.kde.org/r/125766/diff/
> 
> 
> Testing
> -------
> 
> I tested kded5 runs, and the --check, --version and --help options work as expected.
> Also, now it doesn't show a warning every time it's run. I didn't really check it's
> not doing any session management, but SESSION_MANAGER is only used in one place in qtbase,
> at [https://github.com/qtproject/qtbase/blob/dev/src/plugins/platforms/xcb/qxcbsessionmanager.cpp#L350](https://github.com/qtproject/qtbase/blob/dev/src/plugins/platforms/xcb/qxcbsessionmanager.cpp#L350)
> and reading that, I think unsetting the environment variable makes more sense.
> 
> 
> Thanks,
> 
> Antonio Larrosa Jimenez
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20151030/70ebf417/attachment.html>


More information about the Kde-frameworks-devel mailing list