diff options
author | Lars Knoll <lars.knoll@digia.com> | 2013-09-18 11:00:38 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-09-22 01:06:20 +0200 |
commit | 50624234f2c0b6d3b0985edb8ff0b6aad5cad761 (patch) | |
tree | 2852c8917788d870100278d1cdc0129b94c5b599 /src/qml/util | |
parent | 8b3623ee7b707e1b26ad48bdbf7816b95d9e0e24 (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/qml/util')
-rw-r--r-- | src/qml/util/qqmladaptormodel.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/qml/util/qqmladaptormodel.cpp b/src/qml/util/qqmladaptormodel.cpp index 51d6b3c4da..4b1c30d4d2 100644 --- a/src/qml/util/qqmladaptormodel.cpp +++ b/src/qml/util/qqmladaptormodel.cpp @@ -223,8 +223,8 @@ public: const int propertyId = propertyRoles.indexOf(it.value()); const QByteArray &propertyName = it.key(); - QV4::Property *p = proto->insertMember(v4->newString(QString::fromUtf8(propertyName)), - QV4::Attr_Accessor|QV4::Attr_NotEnumerable|QV4::Attr_NotConfigurable); + QV4::ScopedString name(scope, v4->newString(QString::fromUtf8(propertyName))); + QV4::Property *p = proto->insertMember(name, QV4::Attr_Accessor|QV4::Attr_NotEnumerable|QV4::Attr_NotConfigurable); p->setGetter(new (v4->memoryManager) QV4::IndexedBuiltinFunction(v4->rootContext, propertyId, QQmlDMCachedModelData::get_property)); p->setSetter(new (v4->memoryManager) QV4::IndexedBuiltinFunction(v4->rootContext, propertyId, QQmlDMCachedModelData::set_property)); } |