mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-11-30 11:26:44 -05:00
parent
9f819061cd
commit
d1310b3337
5 changed files with 87 additions and 1 deletions
|
|
@ -20,6 +20,8 @@
|
|||
#define KEEPASSX_APPLICATION_H
|
||||
|
||||
#include <QApplication>
|
||||
#include <QtNetwork/QLocalServer>
|
||||
class QLockFile;
|
||||
|
||||
class QSocketNotifier;
|
||||
|
||||
|
|
@ -30,12 +32,15 @@ class Application : public QApplication
|
|||
public:
|
||||
Application(int& argc, char** argv);
|
||||
QWidget* mainWindow() const;
|
||||
~Application();
|
||||
void setMainWindow(QWidget* mainWindow);
|
||||
|
||||
bool event(QEvent* event) override;
|
||||
bool isAlreadyRunning() const;
|
||||
|
||||
signals:
|
||||
void openFile(const QString& filename);
|
||||
void anotherInstanceStarted();
|
||||
|
||||
private slots:
|
||||
#if defined(Q_OS_UNIX)
|
||||
|
|
@ -54,6 +59,9 @@ private:
|
|||
static void handleUnixSignal(int sig);
|
||||
static int unixSignalSocket[2];
|
||||
#endif
|
||||
bool alreadyRunning;
|
||||
QLockFile* lock;
|
||||
QLocalServer server;
|
||||
};
|
||||
|
||||
#endif // KEEPASSX_APPLICATION_H
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue