aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/qml
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@digia.com>2014-01-08 14:51:33 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-01-20 21:13:51 +0100
commit375ebc57ac6401d09818e6aa4ea7d6324dbe93a6 (patch)
treec6cbe21dbe3b620e1b712a82eb11f4f4db491f57 /src/qml/qml
parenta7431e41128bd3aa272223746a5bb57597a87de3 (diff)
Don't return a Property pointer in Object::advanceIterator
Change-Id: Iac4cb2a2252b18e40455910e51e3e374df7c1e80 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'src/qml/qml')
-rw-r--r--src/qml/qml/qqmllistwrapper.cpp11
-rw-r--r--src/qml/qml/qqmllistwrapper_p.h2
2 files changed, 6 insertions, 7 deletions
diff --git a/src/qml/qml/qqmllistwrapper.cpp b/src/qml/qml/qqmllistwrapper.cpp
index 76c11cb748..2272beec4a 100644
--- a/src/qml/qml/qqmllistwrapper.cpp
+++ b/src/qml/qml/qqmllistwrapper.cpp
@@ -150,21 +150,20 @@ void QmlListWrapper::destroy(Managed *that)
w->~QmlListWrapper();
}
-Property *QmlListWrapper::advanceIterator(Managed *m, ObjectIterator *it, StringRef name, uint *index, PropertyAttributes *attrs)
+void QmlListWrapper::advanceIterator(Managed *m, ObjectIterator *it, StringRef name, uint *index, Property *p, PropertyAttributes *attrs)
{
name = (String *)0;
*index = UINT_MAX;
QmlListWrapper *w = m->as<QmlListWrapper>();
quint32 count = w->property.count ? w->property.count(&w->property) : 0;
if (it->arrayIndex < count) {
- if (attrs)
- *attrs = QV4::Attr_Data;
*index = it->arrayIndex;
++it->arrayIndex;
- it->tmpDynamicProperty.value = QV4::QObjectWrapper::wrap(w->engine(), w->property.at(&w->property, *index));
- return &it->tmpDynamicProperty;
+ *attrs = QV4::Attr_Data;
+ p->value = QV4::QObjectWrapper::wrap(w->engine(), w->property.at(&w->property, *index));
+ return;
}
- return QV4::Object::advanceIterator(m, it, name, index, attrs);
+ return QV4::Object::advanceIterator(m, it, name, index, p, attrs);
}
QT_END_NAMESPACE
diff --git a/src/qml/qml/qqmllistwrapper_p.h b/src/qml/qml/qqmllistwrapper_p.h
index 9ece5851ed..11916a4f91 100644
--- a/src/qml/qml/qqmllistwrapper_p.h
+++ b/src/qml/qml/qqmllistwrapper_p.h
@@ -84,7 +84,7 @@ public:
static ReturnedValue get(Managed *m, const StringRef name, bool *hasProperty);
static ReturnedValue getIndexed(Managed *m, uint index, bool *hasProperty);
static void put(Managed *m, const StringRef name, const ValueRef value);
- static Property *advanceIterator(Managed *m, ObjectIterator *it, StringRef name, uint *index, PropertyAttributes *attributes);
+ static void advanceIterator(Managed *m, ObjectIterator *it, StringRef name, uint *index, Property *p, PropertyAttributes *attributes);
static void destroy(Managed *that);
private: