N9 problem while applying single instance with QShareMemory.
-
Hi all!
one day I must make my application run only one instance at same time.
-I had added "Exec=invoker --single-instance --type=e/opt/myapp/bin/myapp" on .desktop file but it was not work.
-after that i try using QShareMemory to store some values to know the application is running or not and clear these value when application exitting. it's ok but when killing application on terminal by calling "killall -KILL myapp" the QShareMemory not clear these values.How can solve it?
-
You can try the Single Application component in the Qt Solutions archive. It works as expected on Windows:
http://qt.nokia.com/products/qt-addons/solutions-archive/ -
@ckakman: i had used single Application but it was not work too, i build for N9 may be it is problem.
@Lukas Geyer: I think your advise is good, but it still ran many instance of application. after that i improved some thing follow this guide "http://developer.qt.nokia.com/wiki/Single_Instance_Harmattan_Applications":http://developer.qt.nokia.com/wiki/Single_Instance_Harmattan_Applications. It solved the problem but application couldn't start from touching on icon. do you have any suggestion?