aboutsummaryrefslogtreecommitdiffstats
path: root/src/imports/xmllistmodel
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@digia.com>2013-09-18 11:00:38 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-09-22 01:06:20 +0200
commit50624234f2c0b6d3b0985edb8ff0b6aad5cad761 (patch)
tree2852c8917788d870100278d1cdc0129b94c5b599 /src/imports/xmllistmodel
parent8b3623ee7b707e1b26ad48bdbf7816b95d9e0e24 (diff)
Add a Safe<T> class and start using it
The class denotes objects that are stored safely in areas controlled by the GC. These we can convert fast to a StringRef etc. Change-Id: I6b154eccaefddc42d4fafca55b7ee9e77179830c Reviewed-by: Simon Hausmann <simon.hausmann@digia.com> Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
Diffstat (limited to 'src/imports/xmllistmodel')
-rw-r--r--src/imports/xmllistmodel/qqmlxmllistmodel.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/imports/xmllistmodel/qqmlxmllistmodel.cpp b/src/imports/xmllistmodel/qqmlxmllistmodel.cpp
index f87273be40..2991bd9755 100644
--- a/src/imports/xmllistmodel/qqmlxmllistmodel.cpp
+++ b/src/imports/xmllistmodel/qqmlxmllistmodel.cpp
@@ -926,7 +926,8 @@ QQmlV4Handle QQuickXmlListModel::get(int index) const
Scope scope(v4engine);
Scoped<Object> o(scope, v4engine->newObject());
for (int ii = 0; ii < d->roleObjects.count(); ++ii) {
- Property *p = o->insertMember(v4engine->newIdentifier(d->roleObjects[ii]->name()), PropertyAttributes());
+ ScopedString name(scope, v4engine->newIdentifier(d->roleObjects[ii]->name()));
+ Property *p = o->insertMember(name, PropertyAttributes());
p->value = Value::fromReturnedValue(v8engine->fromVariant(d->data.value(ii).value(index)));
}