diff options
author | Richard Moe Gustavsen <richard.gustavsen@nokia.com> | 2011-01-19 10:13:56 (GMT) |
---|---|---|
committer | Richard Moe Gustavsen <richard.gustavsen@nokia.com> | 2011-01-19 10:13:56 (GMT) |
commit | de1b44c967501666bfcb7a28d4c233708ce2c65e (patch) | |
tree | a69d399168e62bea79b4b2e4751f5c1e8cafd4a5 /src/gui | |
parent | 2e67558f169a8ccc1b50a6a50f5093e0499c75f0 (diff) | |
download | Qt-de1b44c967501666bfcb7a28d4c233708ce2c65e.zip Qt-de1b44c967501666bfcb7a28d4c233708ce2c65e.tar.gz Qt-de1b44c967501666bfcb7a28d4c233708ce2c65e.tar.bz2 |
Cocoa: fix qwidget autotest (optimizedResizeMove) for raster engine
In setGeometry_sys we used to call invalidateBuffer. This
function does not take into account widgets with static contents
when resizing. invlidateBuffer_resizeHelper does. The new code
with this patch will make setGeometry_sys work the same way as in
qwidget_x11::setGeometry_sys.
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/kernel/qwidget_mac.mm | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/src/gui/kernel/qwidget_mac.mm b/src/gui/kernel/qwidget_mac.mm index 993c8f0..0161b33 100644 --- a/src/gui/kernel/qwidget_mac.mm +++ b/src/gui/kernel/qwidget_mac.mm @@ -4561,17 +4561,11 @@ void QWidgetPrivate::setGeometry_sys_helper(int x, int y, int w, int h, bool isM const QRect oldRect(oldp, olds); if (!isResize && QApplicationPrivate::graphicsSystem()) moveRect(oldRect, x - oldp.x(), y - oldp.y()); + setWSGeometry(false, oldRect); - if (isResize && QApplicationPrivate::graphicsSystem()) { - invalidateBuffer(q->rect()); - if (extra && !graphicsEffect && !extra->mask.isEmpty()) { - QRegion oldRegion(extra->mask.translated(oldp)); - oldRegion &= oldRect; - q->parentWidget()->d_func()->invalidateBuffer(oldRegion); - } else { - q->parentWidget()->d_func()->invalidateBuffer(effectiveRectFor(oldRect)); - } - } + + if (isResize && QApplicationPrivate::graphicsSystem()) + invalidateBuffer_resizeHelper(oldp, olds); } if(isMove || isResize) { |