summaryrefslogtreecommitdiffstats
path: root/src/opengl/qgl.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/opengl/qgl.cpp')
-rw-r--r--src/opengl/qgl.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/opengl/qgl.cpp b/src/opengl/qgl.cpp
index fc1280bfc4..5aec058532 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();