summaryrefslogtreecommitdiffstats
path: root/examples/widgets/widgets/sliders/slidersgroup.h
diff options
context:
space:
mode:
authorMarc Mutz <marc.mutz@kdab.com>2021-06-25 23:54:05 +0200
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2021-06-28 14:22:55 +0000
commit9d0bd169bbf950cca3705a8c855c82e236e928e8 (patch)
treee663044e8d142d043658d2521c473ef5ac93c5ae /examples/widgets/widgets/sliders/slidersgroup.h
parentae71fb7fe99bc66b9ca2fafa28b016065ac3b14d (diff)
QVarLengthArray: fix aliasing error in insert(it, n, v)
Taking the copy after the resize is completely pointless: the copy is there to ensure that `t`, being a reference potentially aliasing an element in [begin(), end()[ before the resize(), isn't invalidated by the resize(), so it must be taken before resize(). Add a comment so the next rewrite doesn't cause this to be mixed up again. [ChangeLog][QtCore][QVarLengthArray] Fixed an aliasing bug affecting insertions of objects aliasing existing elements. Change-Id: I26bc449fa99bf8d09a19147a12a69ac4314cc61d Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> (cherry picked from commit 6e57e41f9aef5ccfa122c10bc6253d47dafd93d2) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'examples/widgets/widgets/sliders/slidersgroup.h')
0 files changed, 0 insertions, 0 deletions