diff options
author | Marc Mutz <marc.mutz@kdab.com> | 2016-01-26 14:38:54 +0100 |
---|---|---|
committer | Marc Mutz <marc.mutz@kdab.com> | 2016-04-25 07:38:59 +0000 |
commit | bac6da10dd043a413c1480028b70ac35ff0e0dfe (patch) | |
tree | 54d181f5a2e60b7ec7e788871e1984a55f293232 /src/network/kernel/qnetworkproxy_win.cpp | |
parent | 036b40403260c4b5de256e8118a90ec04538a312 (diff) |
QtNetwork: eradicate Q_FOREACH loops [needing qAsConst()]
... by replacing them with C++11 range-for loops.
To avoid detaches of these mutable Qt containers,
wrap the container in qAsConst().
Change-Id: I47c5308a6ad220b4c5495e55a3b0d38547bfa8d9
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
Diffstat (limited to 'src/network/kernel/qnetworkproxy_win.cpp')
-rw-r--r-- | src/network/kernel/qnetworkproxy_win.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/network/kernel/qnetworkproxy_win.cpp b/src/network/kernel/qnetworkproxy_win.cpp index 0838227123..328f6f889b 100644 --- a/src/network/kernel/qnetworkproxy_win.cpp +++ b/src/network/kernel/qnetworkproxy_win.cpp @@ -392,9 +392,9 @@ public: } void clear() { - foreach (HANDLE event, m_watchEvents) + for (HANDLE event : qAsConst(m_watchEvents)) CloseHandle(event); - foreach (HKEY key, m_registryHandles) + for (HKEY key : qAsConst(m_registryHandles)) RegCloseKey(key); m_watchEvents.clear(); |