summaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
authorAndreas Hartmetz <andreas.hartmetz@kdab.com>2012-10-14 04:28:51 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2012-10-19 18:04:11 +0200
commitbdc115d9698d4f3cf5ce089dbddca75e425d3eeb (patch)
tree07951c7374ebf7f7c82959872be0d00103e353a0 /src/gui
parentc4ff5c53efc213d9ce4fe0cfe9ab3d6c13cd8716 (diff)
detach() safely in QVector::erase(), and update callers to not detach.
remove() can use non-detaching iterators internally before calling erase(), which hasn't been exploited so far, so that the detach() in erase() never actually detached. When using erase() from outside, you can't do it legally without calling begin() or end() that detach() before erase() is called. Now remove() doesn't detach anymore, and detaching in erase() works. With new tests that fail after changing only the erase() callers and pass again after fixing erase(). Change-Id: I47c0a9e362dce8628ec566f5437d951755de96c8 Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com> Reviewed-by: Olivier Goffart <ogoffart@woboq.com> Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Diffstat (limited to 'src/gui')
0 files changed, 0 insertions, 0 deletions