graesslin created this revision. graesslin added a reviewer: Plasma. Restricted Application added a project: Plasma. Restricted Application added a subscriber: plasma-devel.
REVISION 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 REPOSITORY rKDECLITOOLS KDE CLI Utilities BRANCH kaboutdata-parse REVISION DETAIL https://phabricator.kde.org/D3160 AFFECTED FILES kcmshell/main.cpp EMAIL PREFERENCES https://phabricator.kde.org/settings/panel/emailpreferences/ To: graesslin, #plasma Cc: plasma-devel, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas