dotherside/lib/include/DOtherSide/DOtherSideSingleInstance.h

27 lines
424 B
C
Raw Normal View History

2021-07-21 19:34:28 +03:00
#ifndef SINGLEINSTANCE_H
#define SINGLEINSTANCE_H
#include <QObject>
class QLocalServer;
class SingleInstance : public QObject
{
Q_OBJECT
public:
explicit SingleInstance(const QString &uniqueName, QObject *parent = nullptr);
~SingleInstance() override;
bool isFirstInstance() const;
signals:
void secondInstanceDetected();
private:
QLocalServer *m_localServer;
};
#endif // SINGLEINSTANCE_H