D6579: KDBusService: pass executable name to QStringList arguments in the activateRequested signal

2017-07-09 Thread David Faure
dfaure abandoned this revision.
dfaure added a comment.


  It was already documented that the arg list could be empty when called 
directly via DBus, so this fix is wrong. Apps have to handle empty args list 
correctly.
  
  Docu updated in 
https://commits.kde.org/kdbusaddons/856ddb707268c683be3406eeb7d41437a531e4d9 
instead.

REPOSITORY
  R271 KDBusAddons

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

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


D6579: KDBusService: pass executable name to QStringList arguments in the activateRequested signal

2017-07-09 Thread David Faure
dfaure updated this revision to Diff 16374.
dfaure added a comment.


  Make the behaviour explicit in the documentation.

REPOSITORY
  R271 KDBusAddons

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D6579?vs=16373=16374

BRANCH
  master

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

AFFECTED FILES
  src/kdbusservice.cpp
  src/kdbusservice.h

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


D6579: KDBusService: pass executable name to QStringList arguments in the activateRequested signal

2017-07-09 Thread David Faure
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