apaku/slimfeed

create only single instance of the application

Opened this issue · 0 comments

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.