diff options
author | Morten Johan Sørvig <morten.sorvig@digia.com> | 2015-04-13 14:28:58 +0200 |
---|---|---|
committer | Morten Johan Sørvig <morten.sorvig@digia.com> | 2015-04-13 14:28:58 +0200 |
commit | 02ff2973ceeef00ced4468b6e15cfadd9f021b0d (patch) | |
tree | e5b51329fceb3d0134e533e41c0f3800549f1786 /src/opengl | |
parent | c5b743472fc36986cf34636dbcb73a0d0fa6b9e6 (diff) | |
parent | 16c32710bc8a5ecefc833352159361be564f3fe4 (diff) |
Merge remote-tracking branch 'gerrit/dev' into dev-highdpi
Conflicts:
src/plugins/platforms/xcb/qxcbbackingstore.cpp
Change-Id: Ib7f277957636186d0abd58d8c710392ef7b02e13
Diffstat (limited to 'src/opengl')
-rw-r--r-- | src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp | 2 | ||||
-rw-r--r-- | src/opengl/qgl.cpp | 5 |
2 files changed, 4 insertions, 3 deletions
diff --git a/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp b/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp index e049f53fac..bd4c1fa94b 100644 --- a/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp +++ b/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp @@ -1217,7 +1217,7 @@ void QGL2PaintEngineExPrivate::drawVertexArrays(const float *data, int *stops, i GLenum primitive) { // Now setup the pointer to the vertex array: - setVertexAttributePointer(QT_VERTEX_COORDS_ATTR, (GLfloat*)data); + setVertexAttributePointer(QT_VERTEX_COORDS_ATTR, data); int previousStop = 0; for (int i=0; i<stopCount; ++i) { diff --git a/src/opengl/qgl.cpp b/src/opengl/qgl.cpp index 38643c50da..352b11b73d 100644 --- a/src/opengl/qgl.cpp +++ b/src/opengl/qgl.cpp @@ -1615,6 +1615,7 @@ QDebug operator<<(QDebug dbg, const QGLFormat &f) { const QGLFormatPrivate * const d = f.d; + QDebugStateSaver saver(dbg); dbg.nospace() << "QGLFormat(" << "options " << d->opts << ", plane " << d->pln @@ -1632,7 +1633,7 @@ QDebug operator<<(QDebug dbg, const QGLFormat &f) << ", profile " << d->profile << ')'; - return dbg.space(); + return dbg; } #endif @@ -2312,7 +2313,7 @@ static void convertToGLFormatHelper(QImage &dst, const QImage &img, GLenum textu qreal sy = target_height / qreal(img.height()); quint32 *dest = (quint32 *) dst.scanLine(0); // NB! avoid detach here - uchar *srcPixels = (uchar *) img.scanLine(img.height() - 1); + const uchar *srcPixels = img.constScanLine(img.height() - 1); int sbpl = img.bytesPerLine(); int dbpl = dst.bytesPerLine(); |