qt5base-lts/src
Tor Arne Vestbø ae6dc7d6df Fix qt_scrollRectInImage when scrolling outside of the image
We were clipping the source rect to the image, both pre and post
scrolling, but did not apply the same logic to the target position.
By computing the target position based on the already clipped source
rect we ensure that the target position is also correct.

This was causing valgrind warnings on Linux, and crashes on Windows,
when trying to test the lower level QBackingStore::scroll() function.
The reason we were not seeing this in practice was that QWidget does
its own sanitation and clipping of the arguments before passing them
on.

As a drive-by, fix the access of image to use constBits instead of a
manual cast, and rename variables to better reflect their use.

Pick-to: 6.3 6.2 5.15
Change-Id: Ibc190c2ef825e634956758f612a018f642f4202b
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
2021-12-14 14:11:26 +01:00
..
3rdparty 3rdparty: Add touchpad gestures support to bundled xinput xcb module 2021-11-13 17:58:45 +03:00
android Recognize system apps also when apk has parent directory 2021-12-08 19:22:36 +02:00
concurrent Doc: Use find_package(Qt6 REQUIRED COMPONENTS ...) idiom 2021-12-09 22:20:04 +01:00
corelib QHash: Improve memory-allocation strategy 2021-12-13 18:58:36 +01:00
dbus Doc: Use find_package(Qt6 REQUIRED COMPONENTS ...) idiom 2021-12-09 22:20:04 +01:00
entrypoint QtBase: replace windows.h with qt_windows.h 2021-11-23 12:53:46 +08:00
gui Fix qt_scrollRectInImage when scrolling outside of the image 2021-12-14 14:11:26 +01:00
network QNetworkAccessBackend: Fix living QObjects after QCoreApplication shutdown 2021-12-13 16:18:06 +01:00
opengl Doc: Use find_package(Qt6 REQUIRED COMPONENTS ...) idiom 2021-12-09 22:20:04 +01:00
openglwidgets Migrate to autogenerated cpp exports 2021-06-25 19:33:12 +02:00
platformsupport evdevkeyboard: Try opening as read-write first 2021-12-08 13:45:34 +01:00
plugins Windows QPA: Fix cursors getting out of sync after restoring override cursors on native windows 2021-12-08 23:41:24 +01:00
printsupport Doc: Use find_package(Qt6 REQUIRED COMPONENTS ...) idiom 2021-12-09 22:20:04 +01:00
sql Doc: Use find_package(Qt6 REQUIRED COMPONENTS ...) idiom 2021-12-09 22:20:04 +01:00
testlib Doc: Use find_package(Qt6 REQUIRED COMPONENTS ...) idiom 2021-12-09 22:20:04 +01:00
tools uic: Generate parameters for ambiguous signals 2021-12-07 14:01:58 +01:00
widgets Fix item view auto-scrolling during drag'n'drop 2021-12-10 23:51:18 +00:00
xml Doc: Use find_package(Qt6 REQUIRED COMPONENTS ...) idiom 2021-12-09 22:20:04 +01:00
CMakeLists.txt Make it possible to disable the PrintSupport module 2021-02-09 09:17:21 +01:00