summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSamuel Gaist <samuel.gaist@edeltech.ch>2013-08-05 09:39:15 (GMT)
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-08-05 09:56:47 (GMT)
commit78b4162a352ddac398b8af7f8be33b009c333244 (patch)
tree9bea6e4d4e1451a93c13cbc71c6127d94ffe8faf
parentb100e49d76232080d782bc7e1e77c29a30c9d710 (diff)
downloadQt-78b4162a352ddac398b8af7f8be33b009c333244.zip
Qt-78b4162a352ddac398b8af7f8be33b009c333244.tar.gz
Qt-78b4162a352ddac398b8af7f8be33b009c333244.tar.bz2
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 <richard.gustavsen@digia.com>
-rw-r--r--src/gui/kernel/qwidget_mac.mm4
1 files changed, 1 insertions, 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();