diff options
author | Olivier Goffart <ogoffart@trolltech.com> | 2009-10-30 12:00:12 (GMT) |
---|---|---|
committer | Olivier Goffart <ogoffart@trolltech.com> | 2009-10-30 12:00:12 (GMT) |
commit | 6edbe2ba4fd231d2fb9de25b861b3e25160ed8ca (patch) | |
tree | a44b65b76e5816f1e0a9a4efa0672b8a6e59a0cc /src/gui/kernel/qwidget.cpp | |
parent | 5e95f9c3c224b87840e750d4280806a40ed40c92 (diff) | |
parent | 85b7896a47f9bb622b394107769cb7c1121a6995 (diff) | |
download | Qt-6edbe2ba4fd231d2fb9de25b861b3e25160ed8ca.zip Qt-6edbe2ba4fd231d2fb9de25b861b3e25160ed8ca.tar.gz Qt-6edbe2ba4fd231d2fb9de25b861b3e25160ed8ca.tar.bz2 |
Merge commit 'widget/4.6' into origin/4.6
Conflicts:
src/gui/effects/qgraphicseffect.cpp
Diffstat (limited to 'src/gui/kernel/qwidget.cpp')
-rw-r--r-- | src/gui/kernel/qwidget.cpp | 22 |
1 files changed, 9 insertions, 13 deletions
diff --git a/src/gui/kernel/qwidget.cpp b/src/gui/kernel/qwidget.cpp index 27e73e0..75bdd73 100644 --- a/src/gui/kernel/qwidget.cpp +++ b/src/gui/kernel/qwidget.cpp @@ -1825,18 +1825,6 @@ void QWidgetPrivate::setDirtyOpaqueRegion() pd->setDirtyOpaqueRegion(); } -QRegion QWidgetPrivate::getOpaqueRegion() const -{ - Q_Q(const QWidget); - - QRegion r = isOpaque ? q->rect() : getOpaqueChildren(); - if (extra && extra->hasMask) - r &= extra->mask; - if (r.isEmpty()) - return r; - return r & clipRect(); -} - const QRegion &QWidgetPrivate::getOpaqueChildren() const { if (!dirtyOpaqueChildren) @@ -1851,9 +1839,17 @@ const QRegion &QWidgetPrivate::getOpaqueChildren() const continue; const QPoint offset = child->geometry().topLeft(); - that->opaqueChildren += child->d_func()->getOpaqueRegion().translated(offset); + QWidgetPrivate *childd = child->d_func(); + QRegion r = childd->isOpaque ? child->rect() : childd->getOpaqueChildren(); + if (childd->extra && childd->extra->hasMask) + r &= childd->extra->mask; + if (r.isEmpty()) + continue; + r.translate(offset); + that->opaqueChildren += r; } + that->opaqueChildren &= q_func()->rect(); that->dirtyOpaqueChildren = false; return that->opaqueChildren; |