diff options
author | Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> | 2021-11-30 19:26:38 +0100 |
---|---|---|
committer | Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> | 2021-12-06 12:28:41 +0100 |
commit | 212b7614e1afce5a3cfc03b481784ff1d2a1aa01 (patch) | |
tree | 371bfda5d69d026eeeceb133cea10defecace027 /src/xml/doc/src/external-resources.qdoc | |
parent | 251e84800793d3f74d7d8e7543eb5e9dba3834ad (diff) |
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>
Diffstat (limited to 'src/xml/doc/src/external-resources.qdoc')
0 files changed, 0 insertions, 0 deletions