summaryrefslogtreecommitdiffstats
path: root/examples/widgets/itemviews/editabletreemodel/CMakeLists.txt
diff options
context:
space:
mode:
authorTor Arne Vestbø <tor.arne.vestbo@qt.io>2021-12-10 17:53:25 +0100
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2021-12-14 15:58:11 +0000
commitfd8ffd6f04785ce63af8a51b7e6d480939651082 (patch)
tree20f296936b78c9b8674d74a6c61654710218c6aa /examples/widgets/itemviews/editabletreemodel/CMakeLists.txt
parent730759c572bac5df9fe17b4d9daaed484b73fe11 (diff)
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. Change-Id: Ibc190c2ef825e634956758f612a018f642f4202b Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io> (cherry picked from commit ae6dc7d6df12b3a5631d20b968823e23f6d7f1f2) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'examples/widgets/itemviews/editabletreemodel/CMakeLists.txt')
0 files changed, 0 insertions, 0 deletions