SingleApplication

Qt Components

Source i (link to git-repo or to original if based on someone elses unmodified work):

Add the source-code for this project on opencode.net

2
Become a Fan
5.7

Description:
The SingleApplication component provides support for applications that can be
only started once per user.

For some applications it is useful or even critical that they are started only once by any user.
Future attempts to start the application should activate any already running instance,
and possibly perform requested actions, e.g. loading a file, in that instance.

The SingleApplication class provides an crossplatform interface to detect a running instance,
and to send command strings to that instance.

The SingleApplication component is basically imitating QtSingleApplication commercial class.
Unlike QtSingleApplication the SingleApplication implementation uses Shared Memory
to detect a running instance and so-called "Local Sockets" to communicate with it.

SingleApplication might be usable in all environments where you find Qt4.
SingleApplication requires Qt 4.4.x or newer.
Last changelog:

version 1.0: 2008-11-30
Initial stable version 1.0.

Note: version 1.0 is binary incompatible with any previous version.


Ratings & Comments

10 Comments

s-valve

If the application crashes on Linux or Mac OS X it is no more possible to restart the app until the user logs out. I suppose that some memory is not deleted and the process is still detected.

xep

it can be a Qt-related issue. i don't remember where is exactly i met this problem. anyway, SA isn't supported any longer since QtSingleApplication was re-licensed under lgpl. probably i can release "last" version with several minor fixes some later...i'm not sure...

s-valve

Hello xep, thanks for your reply. I use now QtSingleApplication. It is also not completely Mac OS X compilant but it's ok for me. sry. brgds, m

agnitsarkar

Thnx for the component. It simplified my work a lot.

thzs

Hi, nice work! Unfortunately it does not compile on Mac OS X since it has no semtimedop() function.

xep

eah, I know. neither semtimedop(...), nor sem_timedwait(...) function(s) - just nothing :( /* f&ucking mac */ Discrepancy to posix standards makes me crazy. I plan to bypass that problem some later. thnx for comment

xep

Now SA must work under MacOS. regards

s-valve

Doesn't work under Mac OS X. I'm using Mac OS 10.5.7 and Qt4.5.1. It seems that no message is sent. brgds

dschulz

I've been looking for a solution like this for a long time. I've seen the examples a few sec ago and must say.. SUPER! :)

netcelli

Good work m8; I will have a look on it ;)

Pling
0 Affiliates
Details
license
version 1.0
updated
added
downloads 24h 0
mediaviews 24h 0
pageviews 24h 1

Other Qt Components:

QyurVisualSqlFilter
purser79
last update date: 8 years ago

Score 5.0

QyurSqlTreeView
purser79
last update date: 8 years ago

Score 6.5

QtBasic
mantur
last update date: 12 years ago

Score 5.0

up2Date
seanpatti
last update date: 9 years ago

Score 5.0

MStyles
mchara
last update date: 17 years ago

Score 5.0

Hdr reading plugin
mchara
last update date: 17 years ago

Score 5.0