[Interest] QProcess overload slot connection

Jason H jhihn at gmx.com
Thu Mar 14 17:59:33 CET 2019

> > > 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.

I agree with both of you. "finished" is ambiguous. "Finished" means the QProcess completed. Let's add completed! That won't ever be confusing...

If my English nuance is right, "completed" would connotate it did what was intended where as "finished" would just mean done. "I'm finished with borrowing the tool, having completed my work with it" 

The fact remains that the developer intention is "when this is over by any means, exit the event loop" is not plainly conveyed by the API.

At a minimum the docs should elaborate that finished() only happens after started, and started only happens if the... process is scheduled?

More information about the Interest mailing list