diff options
author | Sona Kurazyan <sona.kurazyan@qt.io> | 2020-09-24 10:48:33 +0200 |
---|---|---|
committer | Sona Kurazyan <sona.kurazyan@qt.io> | 2020-09-28 15:48:17 +0200 |
commit | a6e1f67937c280961f7ec23b2a002ca7d057761d (patch) | |
tree | 8ca782fdd8960d035077d112d0caa34ba16e7fa2 /examples/widgets/effects | |
parent | b12d6c6a8ab5f7b01bdd2cb862a66a409700faa1 (diff) |
Fix QtConcurrent algorithms to work with temporary sequences
QtConcurrent algorithms are making an internal copy of the passed
sequence, to make sure it won't be destroyed before the execution
is finished. However, they were using iterators of the originally
passed sequence. So, if the original sequence is deleted, QtConcurrent
algorithms would use invalid iterators to a deleted sequence. This
might work with Qt containers thanks to implicit-sharing, but with
other containers will lead to unexpected results. Fixed them to work
on the internal copy of the original sequence.
Change-Id: I1d68692ed9746223c85f51bb05977bc1443b681d
Reviewed-by: Andreas Buhr <andreas.buhr@qt.io>
Reviewed-by: MÃ¥rten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Karsten Heimrich <karsten.heimrich@qt.io>
Diffstat (limited to 'examples/widgets/effects')
0 files changed, 0 insertions, 0 deletions