diff options
author | Sergio Martins <sergio.martins.qnx@kdab.com> | 2013-01-28 15:48:25 +0000 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-01-29 01:50:42 +0100 |
commit | e02ecba61f3a271c4f2559c82904c4b8d3b03e61 (patch) | |
tree | 24c533a5af01eb0e62e5498ade7f3a90f7bc9667 /src/plugins/platforms/qnx/qqnxscreen.h | |
parent | edd2d9bd0a7f5dbe059aea0902d519b728acc01a (diff) |
Delay initialization of QQnxRootWindow until first access.
QtWebProcess, for example, doesn't create any QWindow, so it doesn't
need any root window.
This fixes Webkit2 rendering on QNX.
Change-Id: I1d4c0dd20869798ba2bcd15f9d96e5fca4beb48e
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Diffstat (limited to 'src/plugins/platforms/qnx/qqnxscreen.h')
-rw-r--r-- | src/plugins/platforms/qnx/qqnxscreen.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/plugins/platforms/qnx/qqnxscreen.h b/src/plugins/platforms/qnx/qqnxscreen.h index be09eca1f8..2851c13c52 100644 --- a/src/plugins/platforms/qnx/qqnxscreen.h +++ b/src/plugins/platforms/qnx/qqnxscreen.h @@ -80,7 +80,7 @@ public: int nativeFormat() const { return (depth() == 32) ? SCREEN_FORMAT_RGBA8888 : SCREEN_FORMAT_RGB565; } screen_display_t nativeDisplay() const { return m_display; } screen_context_t nativeContext() const { return m_screenContext; } - const char *windowGroupName() const { return m_rootWindow->groupName().constData(); } + const char *windowGroupName() const { return rootWindow()->groupName().constData(); } QQnxWindow *findWindow(screen_window_t windowHandle); @@ -93,7 +93,7 @@ public: void onWindowPost(QQnxWindow *window); - QSharedPointer<QQnxRootWindow> rootWindow() const { return m_rootWindow; } + QSharedPointer<QQnxRootWindow> rootWindow() const; public Q_SLOTS: void setRotation(int rotation); @@ -114,8 +114,8 @@ private: screen_context_t m_screenContext; screen_display_t m_display; - QSharedPointer<QQnxRootWindow> m_rootWindow; - bool m_primaryScreen; + mutable QSharedPointer<QQnxRootWindow> m_rootWindow; + const bool m_primaryScreen; bool m_posted; int m_initialRotation; |