aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/qml
diff options
context:
space:
mode:
Diffstat (limited to 'src/qml/qml')
-rw-r--r--src/qml/qml/qqmlmetatype.cpp3
-rw-r--r--src/qml/qml/qqmltypemodule.cpp4
2 files changed, 5 insertions, 2 deletions
diff --git a/src/qml/qml/qqmlmetatype.cpp b/src/qml/qml/qqmlmetatype.cpp
index 0a58ee9652..ba7ffe2a91 100644
--- a/src/qml/qml/qqmlmetatype.cpp
+++ b/src/qml/qml/qqmlmetatype.cpp
@@ -770,7 +770,8 @@ void QQmlMetaType::registerModule(const char *uri, QTypeRevision version)
QQmlTypeModule *module = getTypeModule(QString::fromUtf8(uri), version, data);
Q_ASSERT(module);
- module->addMinorVersion(version.minorVersion());
+ if (version.hasMinorVersion())
+ module->addMinorVersion(version.minorVersion());
}
int QQmlMetaType::typeId(const char *uri, QTypeRevision version, const char *qmlName)
diff --git a/src/qml/qml/qqmltypemodule.cpp b/src/qml/qml/qqmltypemodule.cpp
index 01de024deb..5120728031 100644
--- a/src/qml/qml/qqmltypemodule.cpp
+++ b/src/qml/qml/qqmltypemodule.cpp
@@ -61,7 +61,9 @@ void QQmlTypeModule::addMinorVersion(quint8 version)
void QQmlTypeModule::add(QQmlTypePrivate *type)
{
QMutexLocker lock(&m_mutex);
- addMinorVersion(type->version.minorVersion());
+
+ if (type->version.hasMinorVersion())
+ addMinorVersion(type->version.minorVersion());
QList<QQmlTypePrivate *> &list = m_typeHash[type->elementName];
for (int ii = 0; ii < list.count(); ++ii) {