diff options
author | James McDonnell <jmcdonnell@blackberry.com> | 2018-05-01 12:26:05 -0400 |
---|---|---|
committer | James McDonnell <jmcdonnell@blackberry.com> | 2018-07-05 13:35:50 +0000 |
commit | b14527f529e7889319440125b717e6677746eaac (patch) | |
tree | cd70ce552fe9dee3a1c8c79de2ce5a0e8220d6a1 /src/plugins/platforms/qnx/qqnxintegration.h | |
parent | d133b02a3b78229d37f03ae05dda47a48f8cda6d (diff) |
Make QQnxIntegration a singleton
Turn all the static members and functions into regular members and
functions.
Change-Id: Ib37d9bdd1a84e512013af7d334e04cd2b1da640e
Reviewed-by: Dan Cape <dcape@qnx.com>
Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
Diffstat (limited to 'src/plugins/platforms/qnx/qqnxintegration.h')
-rw-r--r-- | src/plugins/platforms/qnx/qqnxintegration.h | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/src/plugins/platforms/qnx/qqnxintegration.h b/src/plugins/platforms/qnx/qqnxintegration.h index f11afa1748..89654f588f 100644 --- a/src/plugins/platforms/qnx/qqnxintegration.h +++ b/src/plugins/platforms/qnx/qqnxintegration.h @@ -87,6 +87,8 @@ public: explicit QQnxIntegration(const QStringList ¶mList); ~QQnxIntegration(); + static QQnxIntegration *instance() { return ms_instance; } + bool hasCapability(QPlatformIntegration::Capability cap) const override; QPlatformWindow *createPlatformWindow(QWindow *window) const override; @@ -120,15 +122,15 @@ public: QPlatformServices *services() const override; - static QWindow *window(screen_window_t qnxWindow); + QWindow *window(screen_window_t qnxWindow); QQnxScreen *screenForNative(screen_display_t qnxScreen) const; void createDisplay(screen_display_t display, bool isPrimary); void removeDisplay(QQnxScreen *screen); QQnxScreen *primaryDisplay() const; - static Options options(); - static screen_context_t screenContext(); + Options options() const; + screen_context_t screenContext(); QQnxNavigatorEventHandler *navigatorEventHandler(); @@ -136,10 +138,10 @@ private: void createDisplays(); void destroyDisplays(); - static void addWindow(screen_window_t qnxWindow, QWindow *window); - static void removeWindow(screen_window_t qnxWindow); + void addWindow(screen_window_t qnxWindow, QWindow *window); + void removeWindow(screen_window_t qnxWindow); - static screen_context_t ms_screenContext; + screen_context_t m_screenContext; QQnxScreenEventThread *m_screenEventThread; QQnxNavigatorEventHandler *m_navigatorEventHandler; QQnxAbstractVirtualKeyboard *m_virtualKeyboard; @@ -161,10 +163,12 @@ private: #if QT_CONFIG(draganddrop) QSimpleDrag *m_drag; #endif - static QQnxWindowMapper ms_windowMapper; - static QMutex ms_windowMapperMutex; + QQnxWindowMapper m_windowMapper; + QMutex m_windowMapperMutex; + + Options m_options; - static Options ms_options; + static QQnxIntegration *ms_instance; friend class QQnxWindow; }; |