summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMichael Brasser <michael.brasser@nokia.com>2010-03-15 00:34:55 (GMT)
committerMichael Brasser <michael.brasser@nokia.com>2010-03-15 00:35:34 (GMT)
commit8b56d83486130e8b95658b3032b25cb6394baaaf (patch)
tree22cbfe3eb1120826dfcb4ffcc58571adc9eccc3e /src
parent5f1bb569360e94939efa04dd507716300b81aad0 (diff)
downloadQt-8b56d83486130e8b95658b3032b25cb6394baaaf.zip
Qt-8b56d83486130e8b95658b3032b25cb6394baaaf.tar.gz
Qt-8b56d83486130e8b95658b3032b25cb6394baaaf.tar.bz2
QDeclarative::isWritable optimization.
Diffstat (limited to 'src')
-rw-r--r--src/declarative/qml/qdeclarativeproperty.cpp8
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;