diff options
author | Lars Knoll <lars.knoll@qt.io> | 2020-09-13 15:41:13 +0200 |
---|---|---|
committer | Lars Knoll <lars.knoll@qt.io> | 2020-09-15 13:32:47 +0200 |
commit | 62b94166cc99dd5fb663c76cfa38e9e888baae59 (patch) | |
tree | f1f11dfe1d31fc6f3daeb90081d0d5264a2b05e3 | |
parent | 0fd8906e743d8c58b5ca7e67be95c5b12ed1f312 (diff) |
Fix QQmlPropertyData after QQMetaType changes in Qt Core
QMetaType::User is now much bigger than it used to be in Qt 5. This
means that 16 bits to hols the property type is not enough. Use
a regular int instead, reorder the members a bit and remove the
unused short.
Change-Id: I4b073e6cf1c7baa664bdee5df9552d109019665d
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
-rw-r--r-- | src/qml/qml/qqmlpropertydata_p.h | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/src/qml/qml/qqmlpropertydata_p.h b/src/qml/qml/qqmlpropertydata_p.h index 3b0a49a6d4..e9d7c8a393 100644 --- a/src/qml/qml/qqmlpropertydata_p.h +++ b/src/qml/qml/qqmlpropertydata_p.h @@ -265,9 +265,7 @@ public: int propType() const { Q_ASSERT(isFullyResolved()); return m_propType; } void setPropType(int pt) { - Q_ASSERT(pt >= 0); - Q_ASSERT(pt <= std::numeric_limits<qint16>::max()); - m_propType = quint16(pt); + m_propType = pt; } int notifyIndex() const { return m_notifyIndex; } @@ -403,8 +401,8 @@ private: bool notFullyResolved() const { return m_flags.notFullyResolved; } Flags m_flags; + int m_propType = 0; qint16 m_coreIndex = -1; - quint16 m_propType = 0; // The notify index is in the range returned by QObjectPrivate::signalIndex(). // This is different from QMetaMethod::methodIndex(). @@ -412,7 +410,6 @@ private: qint16 m_overrideIndex = -1; qint16 m_metaObjectOffset = -1; - quint16 m_reserved = 0; QTypeRevision m_revision = QTypeRevision::zero(); QTypeRevision m_typeVersion = QTypeRevision::zero(); @@ -429,7 +426,6 @@ private: bool QQmlPropertyData::operator==(const QQmlPropertyData &other) const { - Q_UNUSED(m_reserved); return flags() == other.flags() && propType() == other.propType() && coreIndex() == other.coreIndex() && |