summaryrefslogtreecommitdiffstats
path: root/src/corelib/kernel/qcoreapplication.cpp
diff options
context:
space:
mode:
authorMarc Mutz <marc.mutz@kdab.com>2019-05-19 23:25:12 +0200
committerMarc Mutz <marc.mutz@kdab.com>2019-07-03 14:48:33 +0200
commitf99bbfb9ea7a7c96b2fbb7aee2d1d1a9056ca4e7 (patch)
tree3e7e5ba59802a99ee150540583bdbb4900b41e3c /src/corelib/kernel/qcoreapplication.cpp
parent33fdd5c83331290a52fdefcff56e49e6c0409711 (diff)
QFseventsFileSystemWatcherEngine: port some Java-style iterators to ranged-for
Amends b03385f9cff7acc2b37933f493e3eff2d8bbef59. Java-style iterators are scheduled to be deprecated. The general pattern used in the patch is that instead of copying an input list, then iterating over the copy with some calls to it.remove() (which leads to quadratic-complexity loops), we simply copy conditionally (a la remove_copy_if instead of remove_if). To make clearer what's going on, rename the outgoing list to 'unhandled'. To avoid having to touch too much of the loops' structure, which sometimes is quite convoluted, use qScopeGuard to do the append to 'unhandled', unless the original code removed the element. Change-Id: I808a939b9c816b329ee87620e0a3461fee6e3e40 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: MÃ¥rten Nordheim <marten.nordheim@qt.io>
Diffstat (limited to 'src/corelib/kernel/qcoreapplication.cpp')
0 files changed, 0 insertions, 0 deletions