aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/qml/qqmlpropertycache_p.h
diff options
context:
space:
mode:
authorErik Verbruggen <erik.verbruggen@qt.io>2016-08-08 11:11:47 +0200
committerSimon Hausmann <simon.hausmann@qt.io>2016-08-11 07:55:29 +0000
commit4fcd5472233fa4afe3962207af5df4f55f1af276 (patch)
tree78e2eca595ee4d8f2b85820ed37c5932b1a79303 /src/qml/qml/qqmlpropertycache_p.h
parent6e687e85719cf6e8cad218b0307749f7abd049a6 (diff)
QML: Move flag from QQmlPropertyRawData fields into its flags
Change-Id: I4f1aaf92fd1c67ec18ab0f80d6d0bf58b4af6a17 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'src/qml/qml/qqmlpropertycache_p.h')
-rw-r--r--src/qml/qml/qqmlpropertycache_p.h17
1 files changed, 8 insertions, 9 deletions
diff --git a/src/qml/qml/qqmlpropertycache_p.h b/src/qml/qml/qqmlpropertycache_p.h
index 79fd77dd45..6d3c4a8a7e 100644
--- a/src/qml/qml/qqmlpropertycache_p.h
+++ b/src/qml/qml/qqmlpropertycache_p.h
@@ -125,8 +125,9 @@ public:
// Internal QQmlPropertyCache flags
unsigned notFullyResolved : 1; // True if the type data is to be lazily resolved
+ unsigned overrideIndexIsProperty: 1;
- unsigned _padding : 10; // align to 32 bits
+ unsigned _padding : 9; // align to 32 bits
inline Flags();
inline bool operator==(const Flags &other) const;
@@ -201,8 +202,8 @@ public:
_metaObjectOffset = qint16(off);
}
- bool overrideIndexIsProperty() const { return _overrideIndexIsProperty; }
- void setOverrideIndexIsProperty(bool onoff) { _overrideIndexIsProperty = onoff; }
+ bool overrideIndexIsProperty() const { return _flags.overrideIndexIsProperty; }
+ void setOverrideIndexIsProperty(bool onoff) { _flags.overrideIndexIsProperty = onoff; }
int overrideIndex() const { return _overrideIndex; }
void setOverrideIndex(int idx)
@@ -235,10 +236,7 @@ private:
qint16 _revision;
qint16 _metaObjectOffset;
- struct { // When !IsValueTypeVirtual
- uint _overrideIndexIsProperty : 1;
- signed int _overrideIndex : 31;
- };
+ signed int _overrideIndex; // When !IsValueTypeVirtual
};
struct { // When HasAccessors
QQmlAccessors *_accessors;
@@ -584,6 +582,7 @@ QQmlPropertyRawData::Flags::Flags()
, isCloned(false)
, isConstructor(false)
, notFullyResolved(false)
+ , overrideIndexIsProperty(false)
, _padding(0)
{}
@@ -606,7 +605,8 @@ bool QQmlPropertyRawData::Flags::operator==(const QQmlPropertyRawData::Flags &ot
isOverload == other.isOverload &&
isCloned == other.isCloned &&
isConstructor == other.isConstructor &&
- notFullyResolved == other.notFullyResolved;
+ notFullyResolved == other.notFullyResolved &&
+ overrideIndexIsProperty == other.overrideIndexIsProperty;
}
void QQmlPropertyRawData::Flags::copyPropertyTypeFlags(QQmlPropertyRawData::Flags from)
@@ -627,7 +627,6 @@ QQmlPropertyData::QQmlPropertyData()
{
setPropType(0);
setNotifyIndex(-1);
- setOverrideIndexIsProperty(false);
setOverrideIndex(-1);
setRevision(0);
setMetaObjectOffset(-1);