mirror of
https://github.com/status-im/dotherside.git
synced 2025-02-07 02:05:00 +00:00
27 lines
424 B
C++
27 lines
424 B
C++
#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
|