diff options
author | Gunnar Sletta <gunnar@trolltech.com> | 2010-01-22 13:47:15 (GMT) |
---|---|---|
committer | Gunnar Sletta <gunnar@trolltech.com> | 2010-01-22 13:47:15 (GMT) |
commit | 6968a9b9281ef191c566a8e44447fc299cbdd4b7 (patch) | |
tree | 341c24ef4c744e4140f14d88017dc389aa81bbca | |
parent | c705684982213d6168643623fa3bf12c111482fc (diff) | |
download | Qt-6968a9b9281ef191c566a8e44447fc299cbdd4b7.zip Qt-6968a9b9281ef191c566a8e44447fc299cbdd4b7.tar.gz Qt-6968a9b9281ef191c566a8e44447fc299cbdd4b7.tar.bz2 |
Fix QPainter::redirection() to pass autotest.
Reviewed-by: Trond
-rw-r--r-- | src/gui/painting/qpainter.cpp | 5 |
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(); |