[Development] QtSingleApplication in Qt proper?

Kevin Funk kfunk at kde.org
Thu Jun 16 00:19:10 CEST 2016


"We" as in the KDE developers now focus on bringing KDE software towards more 
platforms such as Mac OS X & Windows nowadays. We have discussed various ideas 
to ensure unique application instances on these platforms.

Traditionally, KDE software is Linux focused and uses classes such as 
KUniqueApplication [1] and KDBusService [2] to ensure this; both of them 
requiring DBus for inter-process communication.

This is usually not an option on said platforms and we're favoring the 
QtSingleApplication [3] approach for those. QtCreator is just one of its 

To come to the point: We'd like to be able to use QtSingleApplication, without 
having to copy it to every KDE application's repository out there and building 
it ourselves. Several KDE applications (KDevelop, Krita, Kate) already do so.

Quite a few people asked for "how to implement single instance Qt 
applications" already and being pointed to QtSingleApplication:

- http://stackoverflow.com/questions/5006547/qt-best-practice-for-a-single-instance-app-protection
- http://www.qtcentre.org/threads/19661-Single-Application-Instance

  Is there an interest in having QtSingleApplication in Qt proper? Say qtbase? 
We'd love to do the work if there's a chance for it being accepted.

Alternative for us is to stick it into one of our KDE Frameworks, which does 
not directly benefit the Qt community.



[1] https://api.kde.org/4.x-api/kdelibs-apidocs/kdeui/html/
[2] https://api.kde.org/frameworks/kdbusaddons/html/classKDBusService.html
[3] http://code.qt.io/cgit/qt-creator/qt-creator.git/tree/src/shared/

Kevin Funk | kfunk at kde.org | http://kfunk.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.qt-project.org/pipermail/development/attachments/20160616/5fba1df1/attachment.sig>

More information about the Development mailing list