diff options
author | Marc Mutz <marc.mutz@kdab.com> | 2019-05-17 11:42:53 +0200 |
---|---|---|
committer | Marc Mutz <marc.mutz@kdab.com> | 2019-06-05 14:09:14 +0200 |
commit | ed17fe7fa22d6ce6a9437a19b4baa39528cee1df (patch) | |
tree | 341a9097aa97de66eacac82bdc24364531ae2c9f /.qmake.conf | |
parent | c5e889bf90b255db3597cbcb5e21e8843f4b5365 (diff) |
Eradicate Q_FOREACH loops [2/2]: non-trivial cases
This patch contains two changes where there is a non-neglible chance
that through some indirect call the container we iterate over could be
modified.
In the listener case, it's not impossible that a listener de-registers
when it's notified. So take a copy.
In the polish_objects case, the 'initialized' flag is set before the
loop starts, and the only other reference to polish_objects, in
addPolishObject(), does not append to polish_objects in that case, but
sends the polish event directly. So use a consume loop, to release the
memory and the QPointers once they're dealt with.
Change-Id: I63d32e8a298ed5e1a7d5446434c421df80c0c795
Reviewed-by: Johan Helsing <johan.helsing@qt.io>
Diffstat (limited to '.qmake.conf')
0 files changed, 0 insertions, 0 deletions