Skip to content

Commit

Permalink
[QNX] Fix build/runtime if QT_NO_OPENGL defined
Browse files Browse the repository at this point in the history
Change-Id: I38d511ac0a53b65abfe47baaa6333629df5b578d
Reviewed-by: Kevin Krammer <[email protected]>
Reviewed-by: Sean Harmer <[email protected]>
  • Loading branch information
aholza authored and The Qt Project committed Apr 16, 2013
1 parent b4ce492 commit 0d1ab4e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/plugins/platforms/qnx/qqnxwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,7 @@ void QQnxWindow::setGeometry(const QRect &rect)
{
const QRect oldGeometry = setGeometryHelper(rect);

#if !defined(QT_NO_OPENGL)
// If this is an OpenGL window we need to request that the GL context updates
// the EGLsurface on which it is rendering. The surface will be recreated the
// next time QQnxGLContext::makeCurrent() is called.
Expand All @@ -184,6 +185,7 @@ void QQnxWindow::setGeometry(const QRect &rect)
if (m_platformOpenGLContext != 0 && bufferSize() != rect.size())
m_platformOpenGLContext->requestSurfaceChange();
}
#endif

// Send a geometry change event to Qt (triggers resizeEvent() in QWindow/QWidget).

Expand Down Expand Up @@ -353,13 +355,12 @@ void QQnxWindow::setBufferSize(const QSize &size)

// Create window buffers if they do not exist
if (m_bufferSize.isEmpty()) {
val[0] = m_screen->nativeFormat();
#if !defined(QT_NO_OPENGL)
// Get pixel format from EGL config if using OpenGL;
// otherwise inherit pixel format of window's screen
if (m_platformOpenGLContext != 0) {
val[0] = platformWindowFormatToNativeFormat(m_platformOpenGLContext->format());
} else {
val[0] = m_screen->nativeFormat();
}
#endif

Expand Down

0 comments on commit 0d1ab4e

Please sign in to comment.