summaryrefslogtreecommitdiffstats
path: root/tests/auto/other/lancelot/paintcommands.cpp
diff options
context:
space:
mode:
authorFrederik Gladhorn <frederik.gladhorn@digia.com>2014-04-11 14:36:55 +0200
committerFrederik Gladhorn <frederik.gladhorn@digia.com>2014-04-11 14:36:55 +0200
commit98d3e40fb7c88b670a93e73dace2d0f05a5f903c (patch)
treeb1292124a86c219fb434db4ec28e8f805ff52287 /tests/auto/other/lancelot/paintcommands.cpp
parenta74e4b85be83e2da47f4a1d8fcf0e78079335b80 (diff)
parentbab494e4d046f5617d19f5fec35eeff94377c51f (diff)
Merge remote-tracking branch 'origin/stable' into dev
Conflicts: mkspecs/qnx-armv7le-qcc/qplatformdefs.h src/printsupport/kernel/qcups.cpp src/widgets/styles/qstyle.h tests/auto/widgets/itemviews/qlistwidget/tst_qlistwidget.cpp Change-Id: Ia41e13051169a6d4a8a1267548e7d47b859bb267
Diffstat (limited to 'tests/auto/other/lancelot/paintcommands.cpp')
-rw-r--r--tests/auto/other/lancelot/paintcommands.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/tests/auto/other/lancelot/paintcommands.cpp b/tests/auto/other/lancelot/paintcommands.cpp
index 91cda9b4aa..4449b75e46 100644
--- a/tests/auto/other/lancelot/paintcommands.cpp
+++ b/tests/auto/other/lancelot/paintcommands.cpp
@@ -2430,11 +2430,6 @@ void PaintCommands::command_surface_end(QRegExp)
if (m_type == OpenGLType || m_type == OpenGLBufferType) {
#ifndef QT_NO_OPENGL
QImage new_image = m_surface_glbuffer->toImage().convertToFormat(QImage::Format_ARGB32_Premultiplied);
- m_default_glcontext->makeCurrent(m_default_glcontext->surface());
- m_painter->drawImage(m_surface_rect, new_image);
- // Flush the pipeline:
- m_painter->beginNativePainting();
- m_painter->endNativePainting();
delete m_surface_glpaintdevice;
m_surface_glpaintdevice = 0;
@@ -2442,6 +2437,12 @@ void PaintCommands::command_surface_end(QRegExp)
m_surface_glbuffer = 0;
delete m_surface_glcontext;
m_surface_glcontext = 0;
+
+ m_default_glcontext->makeCurrent(m_default_glcontext->surface());
+ m_painter->drawImage(m_surface_rect, new_image);
+ // Flush the pipeline:
+ m_painter->beginNativePainting();
+ m_painter->endNativePainting();
#endif
#ifdef Q_WS_X11
} else if (m_type == WidgetType) {