diff options
author | Aaron Kennedy <aaron.kennedy@nokia.com> | 2010-03-04 05:19:09 (GMT) |
---|---|---|
committer | Aaron Kennedy <aaron.kennedy@nokia.com> | 2010-03-04 05:19:09 (GMT) |
commit | e86dc3cbc40824353688db52d9933af26a30aaa0 (patch) | |
tree | 9574572b7dd33b990e74f2835d40973ef2cbaea8 /src | |
parent | 26d28b39504d1c55690985deb52646114b6cf710 (diff) | |
download | Qt-e86dc3cbc40824353688db52d9933af26a30aaa0.zip Qt-e86dc3cbc40824353688db52d9933af26a30aaa0.tar.gz Qt-e86dc3cbc40824353688db52d9933af26a30aaa0.tar.bz2 |
QDeclarativeContext::contextProperty() should also access ids
QT-2800
Diffstat (limited to 'src')
-rw-r--r-- | src/declarative/qml/qdeclarativecontext.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/declarative/qml/qdeclarativecontext.cpp b/src/declarative/qml/qdeclarativecontext.cpp index 35e7a77..f70e143 100644 --- a/src/declarative/qml/qdeclarativecontext.cpp +++ b/src/declarative/qml/qdeclarativecontext.cpp @@ -484,7 +484,10 @@ QVariant QDeclarativeContext::contextProperty(const QString &name) const if (!value.isValid() && parentContext()) value = parentContext()->contextProperty(name); } else { - value = d->propertyValues[idx]; + if (idx >= d->propertyValues.count()) + value = QVariant::fromValue(d->idValues[idx - d->propertyValues.count()].data()); + else + value = d->propertyValues[idx]; } return value; |