diff options
Diffstat (limited to 'src/corelib/kernel/qcfsocketnotifier.cpp')
-rw-r--r-- | src/corelib/kernel/qcfsocketnotifier.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/corelib/kernel/qcfsocketnotifier.cpp b/src/corelib/kernel/qcfsocketnotifier.cpp index 7f4c26d978..62272c1bca 100644 --- a/src/corelib/kernel/qcfsocketnotifier.cpp +++ b/src/corelib/kernel/qcfsocketnotifier.cpp @@ -235,7 +235,7 @@ void QCFSocketNotifier::unregisterSocketNotifier(QSocketNotifier *notifier) void QCFSocketNotifier::removeSocketNotifiers() { // Remove CFSockets from the runloop. - foreach (MacSocketInfo *socketInfo, macSockets) { + for (MacSocketInfo *socketInfo : qAsConst(macSockets)) { unregisterSocketInfo(socketInfo); delete socketInfo; } @@ -272,9 +272,9 @@ void QCFSocketNotifier::enableSocketNotifiers(CFRunLoopObserverRef ref, CFRunLoo Q_UNUSED(ref); Q_UNUSED(activity); - QCFSocketNotifier *that = static_cast<QCFSocketNotifier *>(info); + const QCFSocketNotifier *that = static_cast<QCFSocketNotifier *>(info); - foreach (MacSocketInfo *socketInfo, that->macSockets) { + for (MacSocketInfo *socketInfo : that->macSockets) { if (!CFSocketIsValid(socketInfo->socket)) continue; |