[Interest] QProcess overload slot connection

André Pönitz apoenitz at t-online.de
Thu Mar 14 17:27:20 CET 2019


On Thu, Mar 14, 2019 at 08:14:38AM -0700, Thiago Macieira wrote:
> On Thursday, 14 March 2019 07:04:53 PDT Jason H wrote:
> > perhaps adding a QProcess::notRunning signal is in order? Or at least some
> > clarification in the docs?
> 
> Sorry, no. Just the name of the signal you proposed shows it's a bad idea. 
> Signals are always named after verbs in the past tense, indicating something 
> that happened. A process that wasn't running and still isn't running does not 
> indicate something that happened. You're proposing a signal to show that 
> nothing happened, which is not something we want for signals.

I don't consider the request unreasonable. It's effectively an "I am done
with this task, you may ask me whether it was successful or what failed
if you really insist" kind of notification that's "good enough" for quite
a few use cases.

As it stands, from a user code perspective, setting up proper communication
with a QProcess is a bit more boiler-plate than one would naïvely expect
from a Qt solution...

> At best, we that signal would be "failedToStart", but that's just the 
> errorOccurred signal we already have.

Right.

Andre'



More information about the Interest mailing list