Extract the OS event filter implementation (#2422)

This commit is contained in:
Gianluca Recchia 2018-10-30 13:46:12 +01:00 committed by Jonathan White
parent fa687f246e
commit 4e1d3bfd73
6 changed files with 68 additions and 47 deletions

View file

@ -23,6 +23,11 @@
#include <QApplication>
#include <QtNetwork/QLocalServer>
#if defined(Q_OS_WIN) || (defined(Q_OS_UNIX) && !defined(Q_OS_MACOS))
#include <QScopedPointer>
class OSEventFilter;
#endif
class QLockFile;
class QSocketNotifier;
@ -33,7 +38,7 @@ class Application : public QApplication
public:
Application(int& argc, char** argv);
QWidget* mainWindow() const;
~Application();
~Application() override;
void setMainWindow(QWidget* mainWindow);
bool event(QEvent* event) override;
@ -70,6 +75,9 @@ private:
QLockFile* m_lockFile;
QLocalServer m_lockServer;
QString m_socketName;
#if defined(Q_OS_WIN) || (defined(Q_OS_UNIX) && !defined(Q_OS_MACOS))
QScopedPointer<OSEventFilter> m_osEventFilter;
#endif
};
#endif // KEEPASSX_APPLICATION_H