qt6-bb10/tests/auto/corelib/tools/qrect
Giuseppe D'Angelo 2097519b3e QDebug: do not trigger integer overflow when printing a QRect
QRect::width() and height() may overflow: they're only safe to call
when right-left+1 (or bottom-top+1) is representable by an `int`.
Therefore, avoiding calling them from QDebug, which is supposed to
"always work" (otherwise, it's not of great debugging help...).

QRectF does not have this issue as it stores the width directly.

Change-Id: I438dbacae42c17730afb92f05d16e3eebb161255
Pick-to: 6.5
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 0f336500a0add3e3a8bb31c5cc605e5e13e23833)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 8232c837b02885b6e143e6982bda3ef19e4017fa)
2025-01-29 10:50:18 +00:00
..
.gitignore Moving relevant tests to corelib/tools 2011-09-01 13:07:23 +02:00
CMakeLists.txt QRect(F): use comparison helper macros 2024-05-10 15:33:40 +02:00
tst_qrect.cpp QDebug: do not trigger integer overflow when printing a QRect 2025-01-29 10:50:18 +00:00