aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/qml/qqmltypemodule.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/qml/qml/qqmltypemodule.cpp')
-rw-r--r--src/qml/qml/qqmltypemodule.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/qml/qml/qqmltypemodule.cpp b/src/qml/qml/qqmltypemodule.cpp
index 35be51160f..05264abb1d 100644
--- a/src/qml/qml/qqmltypemodule.cpp
+++ b/src/qml/qml/qqmltypemodule.cpp
@@ -94,10 +94,8 @@ void QQmlTypeModulePrivate::add(QQmlTypePrivate *type)
void QQmlTypeModulePrivate::remove(const QQmlTypePrivate *type)
{
- for (TypeHash::ConstIterator elementIt = typeHash.begin(); elementIt != typeHash.end();) {
- QList<QQmlTypePrivate *> &list = const_cast<QList<QQmlTypePrivate *> &>(elementIt.value());
-
- QQmlMetaType::removeQQmlTypePrivate(list, type);
+ for (TypeHash::MutableIterator elementIt = typeHash.begin(); elementIt != typeHash.end();) {
+ QQmlMetaType::removeQQmlTypePrivate(elementIt.value(), type);
#if 0
if (list.isEmpty())