[Development] Qt5.15 deprecating & Qt6 removing QProcess::setupChildProcess

Thiago Macieira thiago.macieira at intel.com
Fri Feb 21 18:55:45 CET 2020


On Friday, 21 February 2020 08:53:33 PST Oswald Buddenhagen wrote:
> On Fri, Feb 21, 2020 at 08:29:54AM -0800, Thiago Macieira wrote:
> >can we deprecate setupChildProcess() in Qt 5.15 and *remove it* in 6.0?
> 
> at least, we should. ;)
> but let's bikeshed the name of the callback setter, which needs to be
> added at the same time -
> setChildProcess{Modifier,Initializer,Setup,...}() ^^

I even thought of making it a signal, like QCoreApplication::aboutToQuit: 
QProcess::childAboutToStart(). That allows for N hooks to be considered, not 
just one, and derived classes like KProcess could insert their own hooks 
independent of their users.

But that is probably a bad idea, as the machinery for emitting signals isn't 
designed to be async-signal-safe. For any receiver in another thread, there's 
also a mutex, which we can't assume we can lock.

If a derived class needs its own child code, it could override the setter and 
wrap calling the user's inside its own.

-- 
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel System Software Products





More information about the Development mailing list