diff options
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/text/qabstracttextdocumentlayout.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gui/text/qabstracttextdocumentlayout.cpp b/src/gui/text/qabstracttextdocumentlayout.cpp index 7735fd6b46..ea6c5d1984 100644 --- a/src/gui/text/qabstracttextdocumentlayout.cpp +++ b/src/gui/text/qabstracttextdocumentlayout.cpp @@ -447,8 +447,8 @@ void QAbstractTextDocumentLayout::unregisterHandler(int objectType, QObject *com { Q_D(QAbstractTextDocumentLayout); - HandlerHash::iterator it = d->handlers.find(objectType); - if (it != d->handlers.end() && (!component || component == it->component)) { + const auto it = d->handlers.constFind(objectType); + if (it != d->handlers.cend() && (!component || component == it->component)) { if (component) disconnect(component, SIGNAL(destroyed(QObject*)), this, SLOT(_q_handlerDestroyed(QObject*))); d->handlers.erase(it); |