diff --git a/src/gui/kernel/qopenglcontext.cpp b/src/gui/kernel/qopenglcontext.cpp index 85d05959def..3c033ea39e1 100644 --- a/src/gui/kernel/qopenglcontext.cpp +++ b/src/gui/kernel/qopenglcontext.cpp @@ -1459,11 +1459,11 @@ void QOpenGLContextGroupPrivate::deletePendingResources(QOpenGLContext *ctx) { QMutexLocker locker(&m_mutex); - QList pending = m_pendingDeletion; + const QList pending = m_pendingDeletion; m_pendingDeletion.clear(); - QList::iterator it = pending.begin(); - QList::iterator end = pending.end(); + QList::const_iterator it = pending.begin(); + QList::const_iterator end = pending.end(); while (it != end) { (*it)->freeResource(ctx); delete *it;