3#ifndef SRC_SINGLEAPPLICATION_H_
4#define SRC_SINGLEAPPLICATION_H_
8#include <QSharedMemory>
56 QSharedMemory sharedMemory;
57 QScopedPointer<QLocalServer> localServer;
59 static const int timeout = 1000;
void receiveMessage()
Slot invoked when an incoming IPC message arrives.
SingleApplication(int &argc, char *argv[], QString uniqueKey)
Construct a SingleApplication with a unique instance key.
auto isRunning() -> bool
Query whether another instance is already running.
void messageAvailable(const QString &message)
messageAvailable notification from commandline
auto sendMessage(const QString &message) -> bool
Send a message to the running instance.