Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. N9 problem while applying single instance with QShareMemory.
Forum Updated to NodeBB v4.3 + New Features

N9 problem while applying single instance with QShareMemory.

Scheduled Pinned Locked Moved Mobile and Embedded
4 Posts 3 Posters 2.2k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • T Offline
    T Offline
    Tratstil
    wrote on 14 Oct 2011, 10:43 last edited by
    #1

    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?

    1 Reply Last reply
    0
    • C Offline
      C Offline
      ckakman
      wrote on 14 Oct 2011, 12:17 last edited by
      #2

      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/

      1 Reply Last reply
      0
      • L Offline
        L Offline
        lgeyer
        wrote on 14 Oct 2011, 12:23 last edited by
        #3

        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.

        1 Reply Last reply
        0
        • T Offline
          T Offline
          Tratstil
          wrote on 17 Oct 2011, 02:02 last edited by
          #4

          @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 Reply Last reply
          0

          1/4

          14 Oct 2011, 10:43

          • Login

          • Login or register to search.
          1 out of 4
          • First post
            1/4
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • Users
          • Groups
          • Search
          • Get Qt Extensions
          • Unsolved