Results 1 to 11 of 11

Thread: Restore an application that is running while using QtSingleApplication

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,368
    Thanks
    3
    Thanked 5,018 Times in 4,794 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Restore an application that is running while using QtSingleApplication

    Quote Originally Posted by Eldritch View Post
    n MSWin, the standard trick is a named mutex (not available on other platforms).
    On u*ix you can use system semaphores or message queues for that. Based on the fact that MacOS is also a u*ix, it should be available there as well. On modern Linuxes, it would be wise to just use dbus

  2. #2
    Join Date
    Apr 2007
    Posts
    46
    Thanks
    4
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Restore an application that is running while using QtSingleApplication

    One thing that bothers me now is that when the user exits with Alt+F4 or through the Task Manager, then the mutex/textfile/etc. will never get deleted, so it will be impossible to restart the program.

  3. #3
    Join Date
    Jan 2006
    Posts
    371
    Thanks
    14
    Thanked 18 Times in 17 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Restore an application that is running while using QtSingleApplication

    so... there is no gpl code available for doing this?

  4. #4
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,368
    Thanks
    3
    Thanked 5,018 Times in 4,794 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Restore an application that is running while using QtSingleApplication

    Quote Originally Posted by ber_44 View Post
    One thing that bothers me now is that when the user exits with Alt+F4 or through the Task Manager, then the mutex/textfile/etc. will never get deleted, so it will be impossible to restart the program.
    You should be able to catch the signal using C function signal() and clean up the mutex before exiting the program.

Similar Threads

  1. Running the application
    By Afflicted.d2 in forum Installation and Deployment
    Replies: 9
    Last Post: 21st October 2006, 22:04
  2. Running application on Mac OS X
    By munna in forum General Discussion
    Replies: 1
    Last Post: 19th April 2006, 20:10
  3. Replies: 5
    Last Post: 16th January 2006, 05:15

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.