Command line options stripped for KUniqueApplication

David Faure faure at kde.org
Wed Jun 22 20:55:23 BST 2011


On Thursday 02 June 2011, Urban Widmark wrote:
> On Fri, May 27, 2011 at 11:54 AM, Aaron J. Seigo <aseigo at kde.org> wrote:
> > one other little "gotcha" is that some unique apps do open a new window
> > when launched a second time, just in the same process. it would be
> > really nice if such applications could note that they do so and thus
> > always leave the flags alone.
> 
> Thanks for your comments. Have had a further think and look at this.
> 
> konsole uses KUniqueApplication and opens windows like you describe.
> There is an inconsistency between a KApplication and
> KUniqueApplication regarding options. [...]

Your analysis seems to be correct. However, before you spend more time on 
this, I would advise to wait until July. Here's why :-)
On the train back from Randa, Kévin Ottens and myself started to work on a 
class that implements the 'registration to dbus' and the 'unique 
functionality' without being a qapplication subclass. This makes the 
functionality available without other kdelibs dependencies (yay), and makes it 
available to non-gui apps too.
Command-line handling is currently missing, but could be added "the right 
way", with your findings in mind :-)
I would point you to the code, but it's on a laptop in the south west of 
France right now :-)

-- 
David Faure, faure at kde.org, http://www.davidfaure.fr
Sponsored by Nokia to work on KDE, incl. Konqueror (http://www.konqueror.org).




More information about the kde-core-devel mailing list