Search for the property in the current meta object.
Change-Id: I085f4285298ae952d9c50ee93c47b4009dbe900f
Reviewed-on: http://codereview.qt.nokia.com/3792
Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
QDeclarativePropertyCache::Data rv;
{
const QMetaObject *cmo = metaObject;
+ const QByteArray propertyName = property.toUtf8();
while (cmo) {
- int idx = metaObject->indexOfProperty(property.toUtf8());
+ int idx = cmo->indexOfProperty(propertyName);
if (idx != -1) {
- QMetaProperty p = metaObject->property(idx);
+ QMetaProperty p = cmo->property(idx);
if (p.isScriptable()) {
- rv.load(metaObject->property(idx));
+ rv.load(p);
return rv;
} else {
while (cmo && cmo->propertyOffset() >= idx)