closest equivalent to KApplicationPrivate::init() ?

René J.V. Bertin rjvbertin at gmail.com
Sun Jan 3 10:11:48 UTC 2016


On Sunday January 03 2016 10:22:27 David Faure wrote:

>> You saw I said "wait for QProcess to be improved", right? I don't expect a patch for QProcess to be incorporated before 5.7.x ...
>
>Patience is a virtue :-)

Oh indeed it is ... and getting a [real] life waiting for something this central to appear in a release version has its advantages too :P

>> Ok, so what about the requirements on QProcess? Anything beyond what's possible with QProcess::startDetached and possibly launch confirmation? Should QProcess figure out transparently (or rather, opaquely :)) whether to use LaunchServices or not, or should the developer be given a way to override it, or even switch to switch to LaunchServices rather than using standard Posix APIs?
>
>Those are implementation details.

Yes, of course. You were hinting at that I start drafting a patch for QProcess, no? Or do you have a Mac yourself on which to cook one up?

>IMHO the API shouldn't talk about any of that, but rather have a flag like "it's a GUI app that I'm starting", which would hint at using LaunchServices
>on OSX is that's the only way to bring it to the front.

That would cause confusion, regardless whether that flag is input or output (or both). I know ECM uses the term "nongui" for something which on OS X just means "don't build as an app bundle", and that at some point in time applications putting up a GUI were more or less obliged to live in such an app bundle. The current reality is different (and in fact the situation was never that black and white). 
Finding a better cross-platform term isn't trivial; are there other platforms where there is a choice between Posix-style spawning and a native mechanism, and where that choice is relevant for Qt? Maybe an enum containing QProcess::NativeLaunch vs. QProcess::PosixLaunch probably with a default flag that means "use whatever is preferred".

You didn't answer my other question. Do you have sufficient overview of the various places where QProcess is used to know if there is any call for features other than starting, stopping/terminating and waiting for confirmation that the process is running? And about that last aspect, should that be an indication "the process is all up and ready for interaction" or just "the process has been launched successfully and is or will be available shortly"?

Cheers,
René


More information about the Kde-frameworks-devel mailing list