diff --git a/src/declarative/qml/qdeclarativepropertycache_p.h b/src/declarative/qml/qdeclarativepropertycache_p.h index d5d7095667..301f70bfe8 100644 --- a/src/declarative/qml/qdeclarativepropertycache_p.h +++ b/src/declarative/qml/qdeclarativepropertycache_p.h @@ -149,6 +149,7 @@ public: bool hasOverride() const { return !(flags & IsValueTypeVirtual) && !(flags & HasAccessors) && overrideIndex >= 0; } + bool hasRevision() const { return !(flags & HasAccessors) && revision != 0; } // Returns -1 if not a value type virtual property inline int getValueTypeCoreIndex() const; diff --git a/src/declarative/qml/v4/qv4irbuilder.cpp b/src/declarative/qml/v4/qv4irbuilder.cpp index 604eeaa713..522bc01684 100644 --- a/src/declarative/qml/v4/qv4irbuilder.cpp +++ b/src/declarative/qml/v4/qv4irbuilder.cpp @@ -437,7 +437,7 @@ bool QV4IRBuilder::visit(AST::IdentifierExpression *ast) QDeclarativePropertyData *data = cache->property(name); - if (data && data->revision != 0) { + if (data && data->hasRevision()) { if (qmlVerboseCompiler()) qWarning() << "*** versioned symbol:" << name; discard(); @@ -458,7 +458,7 @@ bool QV4IRBuilder::visit(AST::IdentifierExpression *ast) QDeclarativePropertyData *data = cache->property(name); - if (data && data->revision != 0) { + if (data && data->hasRevision()) { if (qmlVerboseCompiler()) qWarning() << "*** versioned symbol:" << name; discard(); @@ -609,7 +609,7 @@ bool QV4IRBuilder::visit(AST::FieldMemberExpression *ast) if (!data || data->isFunction()) return false; // Don't support methods (or non-existing properties ;) - if (data->revision != 0) { + if (data->hasRevision()) { if (qmlVerboseCompiler()) qWarning() << "*** versioned symbol:" << name; discard(); diff --git a/src/declarative/qml/v8/qv8qobjectwrapper.cpp b/src/declarative/qml/v8/qv8qobjectwrapper.cpp index 11733be5fd..9c4e07ae4f 100644 --- a/src/declarative/qml/v8/qv8qobjectwrapper.cpp +++ b/src/declarative/qml/v8/qv8qobjectwrapper.cpp @@ -513,7 +513,7 @@ v8::Handle QV8QObjectWrapper::GetProperty(QV8Engine *engine, QObject if (!result) return v8::Handle(); - if (revisionMode == QV8QObjectWrapper::CheckRevision && result->revision != 0) { + if (revisionMode == QV8QObjectWrapper::CheckRevision && result->hasRevision()) { QDeclarativeData *ddata = QDeclarativeData::get(object); if (ddata && ddata->propertyCache && !ddata->propertyCache->isAllowedInRevision(result)) return v8::Handle(); @@ -673,7 +673,7 @@ bool QV8QObjectWrapper::SetProperty(QV8Engine *engine, QObject *object, const QH if (!result) return false; - if (revisionMode == QV8QObjectWrapper::CheckRevision && result->revision != 0) { + if (revisionMode == QV8QObjectWrapper::CheckRevision && result->hasRevision()) { QDeclarativeData *ddata = QDeclarativeData::get(object); if (ddata && ddata->propertyCache && !ddata->propertyCache->isAllowedInRevision(result)) return false;