diff options
author | David Faure <david.faure@kdab.com> | 2017-03-23 12:48:24 +0100 |
---|---|---|
committer | David Faure <david.faure@kdab.com> | 2017-03-23 14:19:09 +0000 |
commit | 83038a7acfc2c1ef82cb9400805410c518245afb (patch) | |
tree | 4ad844d52464de7c695a8034018f33fda8da76b0 /src/corelib/tools/qmap.cpp | |
parent | 95d4ac10e90dc3bb5c6d588b4fa7cb045d7b7fd7 (diff) |
QSFPM optimization in dataChanged: don't re-sort if the order didn't change
We can quickly check if the change affects sorting by checking whether
lessThan(N-1, N) and lessThan(N, N+1) are still true. If this is the case
for all changed rows, then we can skip the whole remove+insert+layoutChanged().
Task-number: QTBUG-1548
Change-Id: Ia778b3e8880cc9909eef1f8a016c84235870353d
Reviewed-by: Stephen Kelly <steveire@gmail.com>
Diffstat (limited to 'src/corelib/tools/qmap.cpp')
0 files changed, 0 insertions, 0 deletions