qt5base-lts/src
Giuseppe D'Angelo 212b7614e1 QListView: fix a broken qBound
If a QListView's model is reset to an empty one, its columnCount()
below the root is going to be 0. Therefore, the code was doing a

  qBound(0, d->column, -1)

which is meaningless (high < low). Instead, do the two logical
operations explicitly: first do an upper bound on d->column
(using qMin) and then lower bound the result by 0 (using qMax).

The code worked by chance, because 0 was eventually the correct
number to use as a bound for d->column.

Change-Id: Ic32077cdab01eaa715137c05ed1f9d66c8eb2f67
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2021-12-06 12:28:41 +01:00
..
3rdparty 3rdparty: Add touchpad gestures support to bundled xinput xcb module 2021-11-13 17:58:45 +03:00
android Android: add methods to get the FileDescriptor for a Uri 2021-12-03 14:19:21 +02:00
concurrent Doc: Enable qdoc warning count limit 2021-10-21 19:10:52 +02:00
corelib QStringBuilder: Add support for QByteArrayView 2021-12-04 08:21:22 +00:00
dbus Doc: Fix qdoc warnings 2021-11-11 11:34:49 +01:00
entrypoint QtBase: replace windows.h with qt_windows.h 2021-11-23 12:53:46 +08:00
gui doc: Add details about what to use instead of QMouseEvent::source() 2021-12-04 12:23:51 +00:00
network QNAM: Reintroduce h2c with an attribute 2021-12-04 08:20:52 +00:00
opengl Don't overwrite flipped textureTransform with unflipped on next blit 2021-12-01 15:03:34 +01:00
openglwidgets Migrate to autogenerated cpp exports 2021-06-25 19:33:12 +02:00
platformsupport evdevtouch: Fix loading screen name for output mapping 2021-10-12 12:52:01 +02:00
plugins Remove .prev_CMakeLists.txt 2021-12-06 11:23:26 +00:00
printsupport Link printer plugins into user projects when using a static Qt 2021-11-19 18:48:07 +01:00
sql Doc: Enable qdoc warning count limit 2021-10-21 19:10:52 +02:00
testlib Verify returns from QXmlTestLogger's xmlQuote() and xmlCdata() 2021-11-30 12:26:08 +01:00
tools androiddeployqt: Fix signing of paths with spaces 2021-12-03 15:09:26 +00:00
widgets QListView: fix a broken qBound 2021-12-06 12:28:41 +01:00
xml Remove leftovers for supporting SAX-based implenentation of QDomDocument 2021-11-26 22:42:40 +01:00
CMakeLists.txt Make it possible to disable the PrintSupport module 2021-02-09 09:17:21 +01:00