aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorErik Verbruggen <erik.verbruggen@qt.io>2016-08-08 11:58:30 +0200
committerErik Verbruggen <erik.verbruggen@qt.io>2016-08-18 12:29:00 +0000
commitb5f9c1e6e7f3a6881874e4ec2f43cea68107a06b (patch)
treebfaa3582f160cbbdcc36bbf02d64bd6dd445f5c4
parent696e12d137fbe479f79a2b1132a7a5fb952e71d8 (diff)
QML: Remove hasAccessors flag from QQmlPropertyRawData
We can now always check if the pointer is null (no accessors) or not. Change-Id: Ie9abf2f8930ea1f75a6d637a47f7f9c4fbab1151 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
-rw-r--r--src/qml/qml/qqmlpropertycache.cpp1
-rw-r--r--src/qml/qml/qqmlpropertycache_p.h7
2 files changed, 2 insertions, 6 deletions
diff --git a/src/qml/qml/qqmlpropertycache.cpp b/src/qml/qml/qqmlpropertycache.cpp
index 7cb1425725..5c53e342f3 100644
--- a/src/qml/qml/qqmlpropertycache.cpp
+++ b/src/qml/qml/qqmlpropertycache.cpp
@@ -678,7 +678,6 @@ void QQmlPropertyCache::append(const QMetaObject *metaObject,
Q_ASSERT(accessorProperty == 0 || (old == 0 && data->revision() == 0));
if (accessorProperty) {
- data->_flags.hasAccessors = true;
data->setAccessors(accessorProperty->accessors);
} else if (old) {
data->markAsOverrideOf(old);
diff --git a/src/qml/qml/qqmlpropertycache_p.h b/src/qml/qml/qqmlpropertycache_p.h
index 480f1dcf40..63a9c63d90 100644
--- a/src/qml/qml/qqmlpropertycache_p.h
+++ b/src/qml/qml/qqmlpropertycache_p.h
@@ -108,7 +108,6 @@ public:
unsigned isFinal : 1; // Has FINAL flag
unsigned isOverridden : 1; // Is overridden by a extension property
unsigned isDirect : 1; // Exists on a C++ QMetaObject
- unsigned hasAccessors : 1; // Has property accessors
unsigned type : 4; // stores an entry of Types
@@ -127,7 +126,7 @@ public:
unsigned notFullyResolved : 1; // True if the type data is to be lazily resolved
unsigned overrideIndexIsProperty: 1;
- unsigned _padding : 9; // align to 32 bits
+ unsigned _padding : 10; // align to 32 bits
inline Flags();
inline bool operator==(const Flags &other) const;
@@ -147,7 +146,7 @@ public:
bool isFinal() const { return _flags.isFinal; }
bool isOverridden() const { return _flags.isOverridden; }
bool isDirect() const { return _flags.isDirect; }
- bool hasAccessors() const { return _flags.hasAccessors; }
+ bool hasAccessors() const { return accessors() != nullptr; }
bool isFunction() const { return _flags.type == Flags::FunctionType; }
bool isQObject() const { return _flags.type == Flags::QObjectDerivedType; }
bool isEnum() const { return _flags.type == Flags::EnumType; }
@@ -576,7 +575,6 @@ QQmlPropertyRawData::Flags::Flags()
, isFinal(false)
, isOverridden(false)
, isDirect(false)
- , hasAccessors(false)
, type(OtherType)
, isVMEFunction(false)
, hasArguments(false)
@@ -600,7 +598,6 @@ bool QQmlPropertyRawData::Flags::operator==(const QQmlPropertyRawData::Flags &ot
isAlias == other.isAlias &&
isFinal == other.isFinal &&
isOverridden == other.isOverridden &&
- hasAccessors == other.hasAccessors &&
type == other.type &&
isVMEFunction == other.isVMEFunction &&
hasArguments == other.hasArguments &&