[kcmshell] set application data only after parsing command line

Authored by graesslin on Oct 26 2016, 5:28 AM.

Description

[kcmshell] set application data only after parsing command line

Summary:
KAboutData provides some information needed for the output of the
command line options like version. Thus it needs to be called before
processing the QCommandLineParser. But if done before any command line
arguments are processed the switch like --desktopfile does not work.

This change reorders the calls so that the command line is first parsed,
then the options of the KAboutData are processed. After that the about
data is set on the application and the command line parser is processed.

With this change both the version option and the desktopfile option is
working. It's important for kcmshell to have the desktopfile option
working so that applications using kcmshell5 as a helper to show
configuration can pass their own app id to kcmshell5, so that it e.g.
registers to a Wayland compositor as org.kde.foo instead of
org.kde.kcmshell5.

Test Plan:
Run kcmshell5 --version, --help, --list and --desktopfile
and compared to variant before

Reviewers: Plasma

Subscribers: plasma-devel

Tags: Plasma

Differential Revision: https://phabricator.kde.org/D3160

Details

Committed
graesslinOct 26 2016, 5:35 AM
Differential Revision
D3160: [kcmshell] set application data only after parsing command line
Parents
R126:2f54dc981fe2: Merge branch 'Plasma/5.8'
Branches
Unknown
Tags
Unknown