N9 problem while applying single instance with QShareMemory.
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:
Well, my advise is that you solve the problem with the invoker in the first place. Start by defining "was not work".
This thread should be moved to Mobile and Embedded.
@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?