[Development] RFC: QProcess variant or separate class for launching applications "GUI-style"

Sorvig Morten Morten.Sorvig at theqtcompany.com
Fri Jan 8 11:12:47 CET 2016


> On 08 Jan 2016, at 10:03, Ziller Eike <Eike.Ziller at theqtcompany.com> wrote:
> 
> 
>> On Jan 7, 2016, at 10:14 PM, René J. V. Bertin <rjvbertin at gmail.com> wrote:
>> 
>> Sorvig Morten wrote:
>> 
>>> Another point: Isn't there a fundamental incompatibiity between LaunchServices
>>> and QProcess? LanchServices may ‘activate’ an already running process, while
>>> QProcess always starts a new process.
> 
> That should be possible to be prohibited with launch flag kLSLaunchNewInstance

But you seldom want to have two instances of (say) Mail running - you start it,
or bring the existing one to front. So kLSLaunchNewInstance does not seems that
useful in practice.

> 
>> This is something that I think we have not yet taken into consideration. It 
>> doesn't necessarily matter for a "startDetached" form of launching though,
> 
> If you just care about starting an application and being notified when it finishes, without the need for output/input streams or PIDs, then you can probably just run “/usr/bin/open -n -W <yourappbundle>"

It could be long wait for the notification: closing the last application window
does usually not cause the application process to exit. If we want to implement 
“user is done” type of notifications we might be heading in the wrong direction
here.

Morten


More information about the Development mailing list