28 #include <QSharedMemory>
29 #include <QSystemSemaphore>
bool isAnotherRunning()
Check whether another instance of the application is running.
const QString key
Name assigned to the instance.
const QString memLockKey
Key labelling the semaphore lock.
void release()
Release the running application.
const QString sharedmemKey
Key labelling the shared memory.
bool tryToRun()
Try to run the applicaiton, return false if another instance is running.
QSystemSemaphore memLock
Lock used when shared memory is accessed.
Class for checking whether the application is already running.
QString generateKeyHash(const QString &key, const QString &salt)
Generate hash string for a given keys.
QSharedMemory sharedMem
Shared memory labelled by a given key.
RunGuard(const QString &key)
Constructor for a run guard.