diff options
| author | Christian Ehrlicher <ch.ehrlicher@gmx.de> | 2017-11-23 20:47:22 +0100 |
|---|---|---|
| committer | Christian Ehrlicher <ch.ehrlicher@gmx.de> | 2017-11-30 17:29:27 +0000 |
| commit | 8a1f0d1f6c63f714d100bd49d9f845b5f88f846a (patch) | |
| tree | db45cf8b7d345b8d8fc7618914b8dede35973010 /tests/auto/sql/kernel/qsqldatabase/tst_qsqldatabase.cpp | |
| parent | f0e9d268c2eafb5ca8897a63f6288097fc280288 (diff) | |
QItemSelectionRange: speedup intersects() in negative case
QItemSelectionRange::intersects() needs to check if the parent of both
QItemSelectionRanges is the same. This is a very expensive operation
which should be done last. Same goes for isValid() which itself calls
parent() for two indexes.
This rearrangement speeds up some worst-case usecases by at least 30%
as shown in the bug report.
Task-number: QTBUG-60940
Change-Id: If6111a73cb8b97a8a0d0640527b34448d21f3143
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
Diffstat (limited to 'tests/auto/sql/kernel/qsqldatabase/tst_qsqldatabase.cpp')
0 files changed, 0 insertions, 0 deletions
