28 #include <QSharedMemory> 29 #include <QSystemSemaphore> 72 #endif // RUNGUARD_HPP RunGuard(const QString &mKey)
Constructor for a runguard.
const QString mKey
Name assigned to the instance.
const QString mMemLockKey
Key labelling the semaphore lock.
QString generateKeyHash(const QString &mKey, const QString &salt)
Generate hash string for a given keys.
void release()
Release the running application.
QSharedMemory mSharedMem
Shared memory labelled by a given key.
Class for checking whether the application is already running.
~RunGuard()
RunGuard destructor.
bool anotherInstanceIsRunning(bool showMessage=true)
Check whether another instance of the application is running.
QSystemSemaphore mMemLock
Lock used when shared memory is accessed.
const QString mSharedMemKey
Key labelling the shared memory.