N9 problem while applying single instance with QShareMemory.
-
wrote on 14 Oct 2011, 10:43 last edited by
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?
-
wrote on 14 Oct 2011, 12:17 last edited by
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/ -
wrote on 14 Oct 2011, 12:23 last edited by
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.
-
wrote on 17 Oct 2011, 02:02 last edited by
@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?
1/4