qt5base-lts/tests/auto
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
..
bic/data Add binary compatibility files for 6.1 2021-09-03 13:41:25 +00:00
cmake Fix dependency chain that collects the metatype json files 2021-12-02 16:34:23 +01:00
concurrent Compile autotests for Integrity 2021-09-20 17:29:04 +03:00
corelib QCache: Adapt to upcoming QHash changes 2021-12-13 18:58:36 +01:00
dbus tests: Remove unused SRCDIR defines 2021-08-17 12:41:57 +00:00
gui Fix qt_scrollRectInImage when scrolling outside of the image 2021-12-14 14:11:26 +01:00
guiapplauncher Move QStateMachine from QtCore to QtScxml 2020-08-24 20:10:25 +02:00
network QNAM: Reintroduce h2c with an attribute 2021-12-04 08:20:52 +00:00
opengl Remove the qmake project files 2021-01-07 15:32:28 +01:00
other QPA: Set focus reason when window activation changes focus 2021-12-03 08:15:29 +01:00
printsupport QtBase: replace windows.h with qt_windows.h 2021-11-23 12:53:46 +08:00
shared Remove false Q_UNREACHABLE from shaping code 2021-02-03 09:44:44 +01:00
sql testlib: Deprecate QWARN() in favor of qWarning() 2021-08-04 19:31:51 +02:00
testlib TAP test logger: avoid dangling space on TODO and SKIP lines 2021-12-09 20:54:26 +01:00
tools QHash: increase minimum buckets to a full span 2021-12-13 18:58:36 +01:00
widgets Fix widget gesture grabbing 2021-12-11 00:51:10 +01:00
xml QDomDocument::setContent: Open device if necessary 2021-11-09 18:33:39 +01:00
CMakeLists.txt Don't build tests/auto/tools when cross-compiling 2021-10-07 08:03:40 +02:00
network-settings.h Replace QtTest headers with QTest 2020-12-22 15:20:30 +01:00