[PATCH] Allow forced new processes for KUniqueApplication
Robert Knight
robertknight at gmail.com
Thu Apr 10 15:38:27 BST 2008
Hello,
What I am really trying to achieve here is to have a way for programs to
be able to start instances of a KUniqueApplication which behave like a
normal KApplication under certain circumstances. In Konsole's case,
whenever it is started from a terminal.
With that in mind, I got rid of both flags and replaced them with a
NonUniqueInstance option which I hope is clearer in its intent:
/**
* These flags can be used to specify how new instances of
* unique applications are created.
*/
enum StartFlag
{
/**
* Create a new instance of the application in a new process and
* do not attempt to re-use an existing process.
*
* With this flag set, the new instance of the application will
* behave as if it were a plain KApplication rather
* than a KUniqueApplication.
*
* This is useful if you have an application where all
* instances are typically run
* in a single process but under certain circumstances
* new instances may require
* their own process.
*/
NonUniqueInstance = 0x1,
};
Q_DECLARE_FLAGS(StartFlags,StartFlag)
Regards,
Robert.
On Sun, 2008-03-23 at 18:56 +0100, Thiago Macieira wrote:
> Robert Knight wrote:
> >StartFlags {
> > ForceNewProcess = 0x1 ,
> > DoNotFork = 0x2
> >}
>
> The two together seem... odd. How can you not fork and yet force a new
> process? :-)
>
> Anyways, I'd suggest the multiple instances approach. How about
> AllowMultipleInstances, thus matching the config?
>
More information about the kde-core-devel
mailing list