summaryrefslogtreecommitdiffstats
path: root/tests/auto/sql/kernel/qsqldatabase/tst_qsqldatabase.cpp
diff options
context:
space:
mode:
authorChristian Ehrlicher <ch.ehrlicher@gmx.de>2017-11-23 20:47:22 +0100
committerChristian Ehrlicher <ch.ehrlicher@gmx.de>2017-11-30 17:29:27 +0000
commit8a1f0d1f6c63f714d100bd49d9f845b5f88f846a (patch)
treedb45cf8b7d345b8d8fc7618914b8dede35973010 /tests/auto/sql/kernel/qsqldatabase/tst_qsqldatabase.cpp
parentf0e9d268c2eafb5ca8897a63f6288097fc280288 (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