diff options
author | Gunnar Sletta <gunnar@trolltech.com> | 2010-01-22 13:47:15 (GMT) |
---|---|---|
committer | Prasanth Ullattil <prasanth.ullattil@nokia.com> | 2010-01-27 15:30:24 (GMT) |
commit | ef427d48fa684578ecb69e4e1ce2072f12362682 (patch) | |
tree | 3299018bb25b65b59e2a4fc4feafcba83592df2b /src | |
parent | c8d6b751955d2857385a44aafd1ecade8d4d3c4e (diff) | |
download | Qt-ef427d48fa684578ecb69e4e1ce2072f12362682.zip Qt-ef427d48fa684578ecb69e4e1ce2072f12362682.tar.gz Qt-ef427d48fa684578ecb69e4e1ce2072f12362682.tar.bz2 |
Fix QPainter::redirection() to pass autotest.
Reviewed-by: Trond
Diffstat (limited to 'src')
-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(); |