From 78b4162a352ddac398b8af7f8be33b009c333244 Mon Sep 17 00:00:00 2001 From: Samuel Gaist Date: Mon, 5 Aug 2013 11:39:15 +0200 Subject: Fix QListWidget item widget scroll bug This fix applies the patch uploaded in the bug report. The patch was provided by Qt-Commercial support but seems to have never found it's way to the sources although the bug was fixed in Qt 5. Task-number: QTBUG-27043 Change-Id: I41c5a7b8f3698bb4396046e5e74863e090ba185a Reviewed-by: Richard Moe Gustavsen --- src/gui/kernel/qwidget_mac.mm | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/gui/kernel/qwidget_mac.mm b/src/gui/kernel/qwidget_mac.mm index 2fe1f06..efd2ff2 100644 --- a/src/gui/kernel/qwidget_mac.mm +++ b/src/gui/kernel/qwidget_mac.mm @@ -4723,14 +4723,12 @@ void QWidgetPrivate::scroll_sys(int dx, int dy, const QRect &qscrollRect) // Scroll the whole widget if qscrollRect is not valid: QRect validScrollRect = qscrollRect.isValid() ? qscrollRect : q->rect(); - validScrollRect &= clipRect(); // If q is overlapped by other widgets, we cannot just blit pixels since // this will move overlapping widgets as well. In case we just update: const bool overlapped = isOverlapped(validScrollRect.translated(data.crect.topLeft())); const bool accelerateScroll = accelEnv && isOpaque && !overlapped; const bool isAlien = (q->internalWinId() == 0); - const QPoint scrollDelta(dx, dy); // If qscrollRect is valid, we are _not_ supposed to scroll q's children (as documented). // But we do scroll children (and the whole of q) if qscrollRect is invalid. This case is @@ -4752,7 +4750,6 @@ void QWidgetPrivate::scroll_sys(int dx, int dy, const QRect &qscrollRect) }else { update_sys(qscrollRect); } - return; } #ifdef QT_MAC_USE_COCOA @@ -4769,6 +4766,7 @@ void QWidgetPrivate::scroll_sys(int dx, int dy, const QRect &qscrollRect) // moved when the parent is scrolled. All directly or indirectly moved // children will receive a move event before the function call returns. QWidgetList movedChildren; + const QPoint scrollDelta(dx, dy); if (scrollChildren) { QObjectList children = q->children(); -- cgit v0.12