summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRaphael Kubo da Costa <rakuco@FreeBSD.org>2013-04-07 19:53:25 +0300
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-04-23 14:42:38 +0200
commit4b69ada361117757a1d9dfd6a9cd444fcb433edc (patch)
tree62270037d3e186bd16f2989135ceeb8b2453b291
parente36e83b5e65a703058ec5a4e4418fe6a49d73e2c (diff)
downloadqt4-tools-4b69ada361117757a1d9dfd6a9cd444fcb433edc.tar.gz
Fix C++11 narrowing error.
src/opengl/qgl_x11.cpp:1805:21: error: non-constant-expression cannot be narrowed from type 'unsigned int' to 'int' in initializer list [-Wc++11-narrowing] 0x20D4, options & QGLContext::CanFlipNativePixmapBindOption ? 0xFFFFFFFF : 0, Simply add an explicit cast to the expression to make it build with libc++. No cherry-pick, this file does not exist in qt5. Change-Id: Ic2fc636fc21a87dae848c062acb048e4a623a1f2 Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
-rw-r--r--src/opengl/qgl_x11.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/opengl/qgl_x11.cpp b/src/opengl/qgl_x11.cpp
index bce19353e5..233d5a2306 100644
--- a/src/opengl/qgl_x11.cpp
+++ b/src/opengl/qgl_x11.cpp
@@ -1802,7 +1802,7 @@ QGLTexture *QGLContextPrivate::bindTextureFromNativePixmap(QPixmap *pixmap, cons
GLX_DRAWABLE_TYPE, GLX_PIXMAP_BIT,
GLX_BIND_TO_TEXTURE_TARGETS_EXT, GLX_TEXTURE_2D_BIT_EXT,
// QGLContext::bindTexture() can't return an inverted texture, but QPainter::drawPixmap() can:
- GLX_Y_INVERTED_EXT, options & QGLContext::CanFlipNativePixmapBindOption ? GLX_DONT_CARE : False,
+ GLX_Y_INVERTED_EXT, int(options & QGLContext::CanFlipNativePixmapBindOption ? GLX_DONT_CARE : False),
XNone
};
configList = glXChooseFBConfig(x11Info.display(), x11Info.screen(), configAttribs, &configCount);