dfaure created this revision.
Restricted Application added a project: Frameworks.

REVISION SUMMARY
  It was done in one case (CommandLine) and not the other (Activate), making
  things very inconsistent. An empty list of arguments makes QCommandLineParser
  fail with a warning (or even exit, when using process() instead of parse()),
  so apps would warn or exit unless they had an explicit check for empty list 
of args.

TEST PLAN
  Since this is a (necessary) behaviour change, I had a look at all the users 
of KDBusService::Unique I could find.
  
  - khelpcenter: was exiting due to QCLP::process when started twice, fixed by 
calling parse() instead, and fixed by this commit.
  - konsole: was unconditionally prepending the exe name, but fortunately 
ignoring positional args, so no behaviour change. Debug output (independent 
from this commit) : Konsole::Application::slotActivateRequested: 
("/usr/bin/konsole", "konsole", "--new-tab")
  - plasmawindowed: early exit when called without arguments, so not affected.
  - plasma-discover: got a bug report for the QCLP assert (367944), fixed by 
early return, now unnecessary.
  - kfontinst, pim-data-exporter: early return if args list empty, will be ok 
with going in the if now.
  - kleopatra, kalarm: had a check (workaround) for the case of empty argument 
list, now unnecessary.
  - kwalletmanager, bluedevil, systemsettings, krunner, plasma-nm-editor: no 
parsing of arguments in the slot connected to ActivateRequested, OK
  - about 15-20 others: no handling of activateRequested, OK
  
  - kde-print-queue: BUGGY. On second run, it tries to print the queue 
"kde-print-queue" as well. Can only be fixed by skipping first arg, after 
relying on this fix.

REPOSITORY
  R271 KDBusAddons

BRANCH
  master

REVISION DETAIL
  https://phabricator.kde.org/D6579

AFFECTED FILES
  src/kdbusservice.cpp

To: dfaure, apol, sandsmark, lukas
Cc: #frameworks

Reply via email to