summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGunnar Sletta <gunnar@trolltech.com>2010-01-22 13:47:15 (GMT)
committerPrasanth Ullattil <prasanth.ullattil@nokia.com>2010-01-27 15:30:24 (GMT)
commitef427d48fa684578ecb69e4e1ce2072f12362682 (patch)
tree3299018bb25b65b59e2a4fc4feafcba83592df2b
parentc8d6b751955d2857385a44aafd1ecade8d4d3c4e (diff)
downloadQt-ef427d48fa684578ecb69e4e1ce2072f12362682.zip
Qt-ef427d48fa684578ecb69e4e1ce2072f12362682.tar.gz
Qt-ef427d48fa684578ecb69e4e1ce2072f12362682.tar.bz2
Fix QPainter::redirection() to pass autotest.
Reviewed-by: Trond
-rw-r--r--src/gui/painting/qpainter.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/gui/painting/qpainter.cpp b/src/gui/painting/qpainter.cpp
index 1258d6b..cde6a2d 100644
--- a/src/gui/painting/qpainter.cpp
+++ b/src/gui/painting/qpainter.cpp
@@ -7503,15 +7503,14 @@ QPaintDevice *QPainter::redirected(const QPaintDevice *device, QPoint *offset)
{
Q_ASSERT(device != 0);
- if (*globalRedirectionAtomic() == 0)
- return 0;
-
if (device->devType() == QInternal::Widget) {
const QWidgetPrivate *widgetPrivate = static_cast<const QWidget *>(device)->d_func();
if (widgetPrivate->redirectDev)
return widgetPrivate->redirected(offset);
}
+ if (*globalRedirectionAtomic() == 0)
+ return 0;
QMutexLocker locker(globalRedirectionsMutex());
QPaintDeviceRedirectionList *redirections = globalRedirections();