From 33593f00e84e6fb05191e9bb88000566c0c96426 Mon Sep 17 00:00:00 2001 From: Lars Knoll Date: Wed, 7 May 2014 13:33:24 +0200 Subject: Get rid of StringRef Remove the Ref classes, as they won't be required anymore once Managed and Managed::Data are separated. Change-Id: Ic6bec2d5b4ecf2595ce129dbb45bbf6a385138a5 Reviewed-by: Simon Hausmann --- src/qml/qml/qqmlcontextwrapper.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'src/qml/qml/qqmlcontextwrapper.cpp') diff --git a/src/qml/qml/qqmlcontextwrapper.cpp b/src/qml/qml/qqmlcontextwrapper.cpp index 46f94832dd..f94d70f61a 100644 --- a/src/qml/qml/qqmlcontextwrapper.cpp +++ b/src/qml/qml/qqmlcontextwrapper.cpp @@ -135,7 +135,7 @@ void QmlContextWrapper::takeContextOwnership(const ValueRef qmlglobal) } -ReturnedValue QmlContextWrapper::get(Managed *m, const StringRef name, bool *hasProperty) +ReturnedValue QmlContextWrapper::get(Managed *m, String *name, bool *hasProperty) { QV4::ExecutionEngine *v4 = m->engine(); QV4::Scope scope(v4); @@ -215,7 +215,7 @@ ReturnedValue QmlContextWrapper::get(Managed *m, const StringRef name, bool *has while (context) { // Search context properties if (context->propertyNames.count()) { - int propertyIdx = context->propertyNames.value(name.getPointer()); + int propertyIdx = context->propertyNames.value(name); if (propertyIdx != -1) { @@ -251,7 +251,7 @@ ReturnedValue QmlContextWrapper::get(Managed *m, const StringRef name, bool *has if (scopeObject) { bool hasProp = false; QV4::ScopedValue result(scope, QV4::QObjectWrapper::getQmlProperty(v4->currentContext(), context, scopeObject, - name.getPointer(), QV4::QObjectWrapper::CheckRevision, &hasProp)); + name, QV4::QObjectWrapper::CheckRevision, &hasProp)); if (hasProp) { if (hasProperty) *hasProperty = true; @@ -264,7 +264,7 @@ ReturnedValue QmlContextWrapper::get(Managed *m, const StringRef name, bool *has // Search context object if (context->contextObject) { bool hasProp = false; - result = QV4::QObjectWrapper::getQmlProperty(v4->currentContext(), context, context->contextObject, name.getPointer(), QV4::QObjectWrapper::CheckRevision, &hasProp); + result = QV4::QObjectWrapper::getQmlProperty(v4->currentContext(), context, context->contextObject, name, QV4::QObjectWrapper::CheckRevision, &hasProp); if (hasProp) { if (hasProperty) *hasProperty = true; @@ -280,7 +280,7 @@ ReturnedValue QmlContextWrapper::get(Managed *m, const StringRef name, bool *has return Primitive::undefinedValue().asReturnedValue(); } -void QmlContextWrapper::put(Managed *m, const StringRef name, const ValueRef value) +void QmlContextWrapper::put(Managed *m, String *name, const ValueRef value) { ExecutionEngine *v4 = m->engine(); QV4::Scope scope(v4); @@ -326,18 +326,18 @@ void QmlContextWrapper::put(Managed *m, const StringRef name, const ValueRef val while (context) { // Search context properties - if (context->propertyNames.count() && -1 != context->propertyNames.value(name.getPointer())) + if (context->propertyNames.count() && -1 != context->propertyNames.value(name)) return; // Search scope object if (scopeObject && - QV4::QObjectWrapper::setQmlProperty(v4->currentContext(), context, scopeObject, name.getPointer(), QV4::QObjectWrapper::CheckRevision, value)) + QV4::QObjectWrapper::setQmlProperty(v4->currentContext(), context, scopeObject, name, QV4::QObjectWrapper::CheckRevision, value)) return; scopeObject = 0; // Search context object if (context->contextObject && - QV4::QObjectWrapper::setQmlProperty(v4->currentContext(), context, context->contextObject, name.getPointer(), QV4::QObjectWrapper::CheckRevision, value)) + QV4::QObjectWrapper::setQmlProperty(v4->currentContext(), context, context->contextObject, name, QV4::QObjectWrapper::CheckRevision, value)) return; context = context->parent; @@ -420,7 +420,7 @@ ReturnedValue QmlContextWrapper::idObjectsArray() return d()->idObjectsWrapper->asReturnedValue(); } -ReturnedValue QmlContextWrapper::qmlSingletonWrapper(QV8Engine *v8, const StringRef &name) +ReturnedValue QmlContextWrapper::qmlSingletonWrapper(QV8Engine *v8, String *name) { if (!d()->context->imports) return Encode::undefined(); -- cgit v1.2.3