[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-core-devel
Subject:    Re: [PATCH] Allow forced new processes for KUniqueApplication
From:       Robert Knight <robertknight () gmail ! com>
Date:       2008-04-10 14:38:27
Message-ID: 1207838308.379.14.camel () robert-laptop
[Download RAW message or body]

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

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic