diff options
author | Maximilian Goldstein <max.goldstein@qt.io> | 2020-10-26 16:15:23 +0100 |
---|---|---|
committer | Maximilian Goldstein <max.goldstein@qt.io> | 2020-10-27 09:24:40 +0100 |
commit | bffcb953e1a824156f6021b33a3aa5de3afb56ac (patch) | |
tree | c4782f76347fde27171cb89d363c6125aaa679ea /src/qml/qml/qqmltypemodule.cpp | |
parent | 3eb705b092bed98b354025ef975e3e4a77c33e76 (diff) |
qqmlmetatypemodule: Fix maximumMinorVersion() returning bad values
maximumMinorVersion() needs to ignore unspecified values as they are not
versions in themselves.
Change-Id: I7c91cf4b8320fd6636eb1be10b069cf885797ee1
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Diffstat (limited to 'src/qml/qml/qqmltypemodule.cpp')
-rw-r--r-- | src/qml/qml/qqmltypemodule.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
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) { |