qt5base-lts/tests/auto/gui/kernel
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
..
noqteventloop Allow QWindowsPipe{Reader|Writer} to work with foreign event loops, take 2 2021-03-02 22:53:06 +02:00
qaction Remove the qmake project files 2021-01-07 15:32:28 +01:00
qactiongroup Remove the qmake project files 2021-01-07 15:32:28 +01:00
qaddpostroutine Remove the qmake project files 2021-01-07 15:32:28 +01:00
qbackingstore Fix qt_scrollRectInImage when scrolling outside of the image 2021-12-14 14:11:26 +01:00
qclipboard Compile autotests for Integrity 2021-09-20 17:29:04 +03:00
qcursor Remove the qmake project files 2021-01-07 15:32:28 +01:00
qdrag Remove the qmake project files 2021-01-07 15:32:28 +01:00
qevent Remove the qmake project files 2021-01-07 15:32:28 +01:00
qfileopenevent Fix a few compiler warnings in tests 2021-02-02 12:06:05 +01:00
qguiapplication Decouple quitOnLastWindowClosed from quitLockEnabled 2021-10-18 15:29:09 +02:00
qguieventdispatcher Remove the qmake project files 2021-01-07 15:32:28 +01:00
qguieventloop Remove .prev_CMakeLists.txt files 2021-01-12 20:59:13 +01:00
qguimetatype Remove the qmake project files 2021-01-07 15:32:28 +01:00
qguitimer Remove the qmake project files 2021-01-07 15:32:28 +01:00
qguivariant Remove the qmake project files 2021-01-07 15:32:28 +01:00
qhighdpi High-dpi configuration change testing 2021-09-08 19:01:54 +02:00
qinputdevice Remove the qmake project files 2021-01-07 15:32:28 +01:00
qinputmethod Remove the qmake project files 2021-01-07 15:32:28 +01:00
qkeyevent Android: unblock passing tests 2021-04-27 21:12:50 +03:00
qkeysequence Remove irrelevant test row, fix compiler warning 2021-01-08 16:37:22 +01:00
qmouseevent Revert "Add grabber context pointers" 2021-04-29 16:49:57 +02:00
qmouseevent_modal Remove the qmake project files 2021-01-07 15:32:28 +01:00
qopenglwindow Remove the qmake project files 2021-01-07 15:32:28 +01:00
qpalette Don't change resolve mask when setting brush doesn't change palette 2021-12-03 21:07:09 +01:00
qpixelformat Remove the qmake project files 2021-01-07 15:32:28 +01:00
qrasterwindow Remove the qmake project files 2021-01-07 15:32:28 +01:00
qscreen Remove the qmake project files 2021-01-07 15:32:28 +01:00
qshortcut Make tst_shortcut pass on Wayland 2021-03-11 11:59:14 +01:00
qsurfaceformat Remove the qmake project files 2021-01-07 15:32:28 +01:00
qtouchevent Revert "Add grabber context pointers" 2021-04-29 16:49:57 +02:00
qwindow tests: add a capability check for QWindow::requestActivate() call 2021-12-08 21:08:04 +01:00
CMakeLists.txt Re-enable tst_qopenglwindow on Linux 2021-12-01 03:28:56 +01:00