diff options
author | Michael Brasser <michael.brasser@nokia.com> | 2010-03-15 00:34:55 (GMT) |
---|---|---|
committer | Michael Brasser <michael.brasser@nokia.com> | 2010-03-15 00:35:34 (GMT) |
commit | 8b56d83486130e8b95658b3032b25cb6394baaaf (patch) | |
tree | 22cbfe3eb1120826dfcb4ffcc58571adc9eccc3e /src | |
parent | 5f1bb569360e94939efa04dd507716300b81aad0 (diff) | |
download | Qt-8b56d83486130e8b95658b3032b25cb6394baaaf.zip Qt-8b56d83486130e8b95658b3032b25cb6394baaaf.tar.gz Qt-8b56d83486130e8b95658b3032b25cb6394baaaf.tar.bz2 |
QDeclarative::isWritable optimization.
Diffstat (limited to 'src')
-rw-r--r-- | src/declarative/qml/qdeclarativeproperty.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/declarative/qml/qdeclarativeproperty.cpp b/src/declarative/qml/qdeclarativeproperty.cpp index 8ca5406..c55c22f 100644 --- a/src/declarative/qml/qdeclarativeproperty.cpp +++ b/src/declarative/qml/qdeclarativeproperty.cpp @@ -494,15 +494,13 @@ QDeclarativeProperty &QDeclarativeProperty::operator=(const QDeclarativeProperty */ bool QDeclarativeProperty::isWritable() const { - QDeclarativeProperty::PropertyTypeCategory category = propertyTypeCategory(); - if (!d->object) return false; - if (category == List) + if (d->core.flags & QDeclarativePropertyCache::Data::IsQList) //list return true; - else if (type() & SignalProperty) + else if (d->core.flags & QDeclarativePropertyCache::Data::IsFunction) //signal handler return false; - else if (d->core.isValid() && d->object) + else if (d->core.isValid()) //normal property return d->core.flags & QDeclarativePropertyCache::Data::IsWritable; else return false; |