From 72fbcc8bbf7bfae962ee9c3d3bccfc8253709bd4 Mon Sep 17 00:00:00 2001 From: Andy Shaw Date: Tue, 18 Feb 2014 13:29:32 +0100 Subject: Ensure we switch back to the real paint engine when not emulating When the emulation paint engine was no longer needed then it would still end up using it because the flags would prevent it from being switched back. This ensures that it has the right engine when something triggers it to be switched. Change-Id: I7571923d16cbebd9fdd34560631b561c07a724f7 Reviewed-by: Laszlo Agocs --- src/gui/painting/qpainter.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/gui/painting') diff --git a/src/gui/painting/qpainter.cpp b/src/gui/painting/qpainter.cpp index 1fc044aa44..e35cdd370e 100644 --- a/src/gui/painting/qpainter.cpp +++ b/src/gui/painting/qpainter.cpp @@ -171,9 +171,6 @@ static bool qt_painter_thread_test(int devType, const char *what) void QPainterPrivate::checkEmulation() { Q_ASSERT(extended); - if (extended->flags() & QPaintEngineEx::DoNotEmulate) - return; - bool doEmulation = false; if (state->bgMode == Qt::OpaqueMode) doEmulation = true; @@ -186,6 +183,9 @@ void QPainterPrivate::checkEmulation() if (pg && pg->coordinateMode() > QGradient::LogicalMode) doEmulation = true; + if (doEmulation && extended->flags() & QPaintEngineEx::DoNotEmulate) + return; + if (doEmulation) { if (extended != emulationEngine) { if (!emulationEngine) -- cgit v1.2.3