aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/qml/qqmlcontextwrapper.cpp
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@digia.com>2013-06-26 09:43:45 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-06-28 14:56:04 +0200
commitf7d727f62c1f1bc0ab756a62ce51b042abf76eb5 (patch)
tree9dd5dc892fb155827e9a4aee5007884ee29e490c /src/qml/qml/qqmlcontextwrapper.cpp
parent553b41c407985e5b18f089679c014d884624afbd (diff)
Get rid of QHashedV4String
This was required while we were using V8, but now we can simply pass QV4::String pointers. Change-Id: If6338e4a455d6132fe14e5e603e4fe9e477d1ffb Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'src/qml/qml/qqmlcontextwrapper.cpp')
-rw-r--r--src/qml/qml/qqmlcontextwrapper.cpp10
1 files changed, 3 insertions, 7 deletions
diff --git a/src/qml/qml/qqmlcontextwrapper.cpp b/src/qml/qml/qqmlcontextwrapper.cpp
index 6a3fd154d3..60345f6626 100644
--- a/src/qml/qml/qqmlcontextwrapper.cpp
+++ b/src/qml/qml/qqmlcontextwrapper.cpp
@@ -170,11 +170,9 @@ Value QmlContextWrapper::get(Managed *m, String *name, bool *hasProperty)
QObject *scopeObject = resource->getScopeObject();
- QHashedV4String propertystring(Value::fromString(name));
-
if (context->imports && name->startsWithUpper()) {
// Search for attached properties, enums and imported scripts
- QQmlTypeNameCache::Result r = context->imports->query(propertystring);
+ QQmlTypeNameCache::Result r = context->imports->query(name);
if (r.isValid()) {
if (hasProperty)
@@ -201,7 +199,7 @@ Value QmlContextWrapper::get(Managed *m, String *name, bool *hasProperty)
while (context) {
// Search context properties
if (context->propertyNames) {
- int propertyIdx = context->propertyNames->value(propertystring);
+ int propertyIdx = context->propertyNames->value(name);
if (propertyIdx != -1) {
@@ -302,11 +300,9 @@ void QmlContextWrapper::put(Managed *m, String *name, const Value &value)
QObject *scopeObject = wrapper->getScopeObject();
- QHashedV4String propertystring(Value::fromString(name));
-
while (context) {
// Search context properties
- if (context->propertyNames && -1 != context->propertyNames->value(propertystring))
+ if (context->propertyNames && -1 != context->propertyNames->value(name))
return;
// Search scope object