apaku / slimfeed

A small and fast feed reader
GNU General Public License v2.0
1 stars 0 forks source link

create only single instance of the application #13

Open apaku opened 13 years ago

apaku commented 13 years ago

Since the app reads/writes from shared files there should always be only a single instance. A small example which is much simpler than the Qt solution QtSingleApplication is in http://www.qtcentre.org/wiki/index.php?title=SingleApplication.

Basic idea is to use a QSharedMemory instance to see wether it exists and then exit directly since another instance is running. Extra feature would be showing the mainwindow by notifying the other instance either via writing to the memory or using the local server/socket as in the example.