QNX: Ensure that m_requestedBufferSize is properly initialised
authorSean Harmer <sean.harmer.qnx@kdab.com>
Thu, 2 Aug 2012 12:17:16 +0000 (13:17 +0100)
committerQt by Nokia <qt-info@nokia.com>
Fri, 3 Aug 2012 16:48:56 +0000 (18:48 +0200)
This solves a new corner case resulting from the recent refactoring of
QQnxWindow::setGeometry() that occurs when using a plain OpenGL backed
window in a single threaded environment and the user code calls
QOpenGLContext::makeCurrent(this) in the QWindow subclass ctor.

Change-Id: Iaf07fbff1cb2743f5706020a8d657a82cb9f2255
Reviewed-by: Kevin Ottens <kevin.ottens.qnx@kdab.com>
Reviewed-by: Kevin Krammer <kevin.krammer@kdab.com>
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
src/plugins/platforms/qnx/qqnxwindow.cpp

index 68a576c..3c05f49 100644 (file)
@@ -73,7 +73,8 @@ QQnxWindow::QQnxWindow(QWindow *window, screen_context_t context)
       m_screen(0),
       m_parentWindow(0),
       m_visible(true),
-      m_windowState(Qt::WindowNoState)
+      m_windowState(Qt::WindowNoState),
+      m_requestedBufferSize(window->geometry().size())
 {
     qWindowDebug() << Q_FUNC_INFO << "window =" << window << ", size =" << window->size();
     int result;