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>
This commit is contained in:
parent
696e12d137
commit
b5f9c1e6e7
|
@ -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);
|
||||
|
|
|
@ -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 &&
|
||||
|
|
Loading…
Reference in New Issue