From 77c3beb90e848a7c38459cd149f7eba977978955 Mon Sep 17 00:00:00 2001 From: Rhys Weatherley Date: Thu, 10 Sep 2009 08:51:35 +1000 Subject: Suppress warnings in QtOpenGL on OpenGL/ES 1.1 systems Reviewed-by: trustme --- src/opengl/qgl.cpp | 7 +++++-- src/opengl/qglpaintdevice.cpp | 2 +- src/opengl/qpaintengine_opengl.cpp | 5 ++++- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/src/opengl/qgl.cpp b/src/opengl/qgl.cpp index 799c749..3e30fe4 100644 --- a/src/opengl/qgl.cpp +++ b/src/opengl/qgl.cpp @@ -1910,8 +1910,8 @@ static void convertToGLFormatHelper(QImage &dst, const QImage &img, GLenum textu int sbpl = img.bytesPerLine(); int dbpl = dst.bytesPerLine(); - int ix = 0x00010000 / sx; - int iy = 0x00010000 / sy; + int ix = int(0x00010000 / sx); + int iy = int(0x00010000 / sy); quint32 basex = int(0.5 * ix); quint32 srcy = int(0.5 * iy); @@ -2217,6 +2217,9 @@ QGLTexture *QGLContextPrivate::bindTexture(const QPixmap &pixmap, GLenum target, return data->texture(); } } +#else + Q_UNUSED(pd); + Q_UNUSED(q); #endif const qint64 key = pixmap.cacheKey(); diff --git a/src/opengl/qglpaintdevice.cpp b/src/opengl/qglpaintdevice.cpp index 8863b01..19db6c0 100644 --- a/src/opengl/qglpaintdevice.cpp +++ b/src/opengl/qglpaintdevice.cpp @@ -180,8 +180,8 @@ QGLPaintDevice* QGLPaintDevice::getDevice(QPaintDevice* pd) glpd = &(static_cast(pd)->d_func()->glDevice); break; case QInternal::Pixmap: { - QPixmapData* pmd = static_cast(pd)->pixmapData(); #if !defined(QT_OPENGL_ES_1) && !defined(QT_OPENGL_ES_1_CL) + QPixmapData* pmd = static_cast(pd)->pixmapData(); Q_ASSERT(pmd->classId() == QPixmapData::OpenGLClass); glpd = static_cast(pmd)->glDevice(); #else diff --git a/src/opengl/qpaintengine_opengl.cpp b/src/opengl/qpaintengine_opengl.cpp index 6466741..86653eb 100644 --- a/src/opengl/qpaintengine_opengl.cpp +++ b/src/opengl/qpaintengine_opengl.cpp @@ -5614,8 +5614,11 @@ QPixmapFilter *QOpenGLPaintEngine::createPixmapFilter(int type) const if (QGLContext::currentContext()) return QGLContext::currentContext()->d_func()->createPixmapFilter(type); else -#endif return 0; +#else + Q_UNUSED(type); + return 0; +#endif } -- cgit v0.12