KDBusService: improve documentation to handle empty argument list correctly.

Authored by dfaure on Jul 9 2017, 9:18 AM.

Description

KDBusService: improve documentation to handle empty argument list correctly.

+ show how to handle --version and --help as well.

Details

Committed
dfaureJul 9 2017, 9:18 AM
Parents
R271:9d35b0ca4442: Revert "API docs: prepend executable name, since QCommandLineParser needs it."
Branches
Unknown
Tags
Unknown
kossebau added inline comments.
/src/kdbusservice.h
225

@dfaure Hi. I am lost a bit when parsing myself the "since ..." :)

I would have thought the reasoning would be about that parse() _does_ handle those flags, and one wants to exit only the new process instance after -h/-v handling, not the running one.

Can we perhaps reword this a bit?

dfaure added inline comments.Nov 20 2019, 9:43 PM
/src/kdbusservice.h
225

This is about the code in the slot connected to this signal (activateRequested).
That slot executes in the already running process, after the DBus communication.
In that slot, we want to call parse() and not process(), so that we do NOT handle --help/--version.

To support those (in the "client" app, the newly started one, before it makes the DBus call), we need to use process() *before* creating the KDBusService instance.

kossebau added inline comments.Nov 20 2019, 9:51 PM
/src/kdbusservice.h
225

Ah, I missed process!=parse, always read that into being the same method name (and thinking of process() behaviour). Okay, now I get it, thanks.
Perhaps still the text could be shaped to not have others run into the same, by putting process vs. parse more explixitly. Will see if it bothers me enough to make a patch :)