summaryrefslogtreecommitdiffstats
path: root/src/gui/painting/qpainter.cpp
diff options
context:
space:
mode:
authorGunnar Sletta <gunnar@trolltech.com>2010-01-22 13:47:15 (GMT)
committerGunnar Sletta <gunnar@trolltech.com>2010-01-22 13:47:15 (GMT)
commit6968a9b9281ef191c566a8e44447fc299cbdd4b7 (patch)
tree341c24ef4c744e4140f14d88017dc389aa81bbca /src/gui/painting/qpainter.cpp
parentc705684982213d6168643623fa3bf12c111482fc (diff)
downloadQt-6968a9b9281ef191c566a8e44447fc299cbdd4b7.zip
Qt-6968a9b9281ef191c566a8e44447fc299cbdd4b7.tar.gz
Qt-6968a9b9281ef191c566a8e44447fc299cbdd4b7.tar.bz2
Fix QPainter::redirection() to pass autotest.
Reviewed-by: Trond
Diffstat (limited to 'src/gui/painting/qpainter.cpp')
-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();