diff options
author | Jędrzej Nowacki <jedrzej.nowacki@nokia.com> | 2011-10-06 13:31:49 +0200 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2011-10-24 12:36:29 +0200 |
commit | 935eb45f340193e035680ebe0f346994a85803d3 (patch) | |
tree | 0feb8ee85dae57cb1e670aec678181a5e0f20e05 /src/declarative/qml/v8/qv8engine.cpp | |
parent | 9539553f02f22058c50361c560872b2f82ae3700 (diff) |
Return v8::Local instead v8::Handle in some functions.
Lets try to keep information about original handle type if possible.
Change-Id: I76484c688ee5605cc99687aa4a17c6ca5d1a3891
Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
Diffstat (limited to 'src/declarative/qml/v8/qv8engine.cpp')
-rw-r--r-- | src/declarative/qml/v8/qv8engine.cpp | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/src/declarative/qml/v8/qv8engine.cpp b/src/declarative/qml/v8/qv8engine.cpp index 7879b7c011..62abbbe59b 100644 --- a/src/declarative/qml/v8/qv8engine.cpp +++ b/src/declarative/qml/v8/qv8engine.cpp @@ -915,9 +915,9 @@ QScriptPassPointer<QJSValuePrivate> QV8Engine::newRegExp(const QRegExp ®exp) // The result is a new Array object with length equal to the length // of the QVariantList, and the elements being the QVariantList's // elements converted to JS, recursively. -v8::Handle<v8::Array> QV8Engine::variantListToJS(const QVariantList &lst) +v8::Local<v8::Array> QV8Engine::variantListToJS(const QVariantList &lst) { - v8::Handle<v8::Array> result = v8::Array::New(lst.size()); + v8::Local<v8::Array> result = v8::Array::New(lst.size()); for (int i = 0; i < lst.size(); ++i) result->Set(i, variantToJS(lst.at(i))); return result; @@ -946,9 +946,9 @@ QVariantList QV8Engine::variantListFromJS(v8::Handle<v8::Array> jsArray) // The result is a new Object object with property names being // the keys of the QVariantMap, and values being the values of // the QVariantMap converted to JS, recursively. -v8::Handle<v8::Object> QV8Engine::variantMapToJS(const QVariantMap &vmap) +v8::Local<v8::Object> QV8Engine::variantMapToJS(const QVariantMap &vmap) { - v8::Handle<v8::Object> result = v8::Object::New(); + v8::Local<v8::Object> result = v8::Object::New(); QVariantMap::const_iterator it; for (it = vmap.constBegin(); it != vmap.constEnd(); ++it) result->Set(QJSConverter::toString(it.key()), variantToJS(it.value())); @@ -1319,10 +1319,9 @@ QVariant &QV8Engine::variantValue(v8::Handle<v8::Value> value) } // Creates a QVariant wrapper object. -v8::Handle<v8::Object> QV8Engine::newVariant(const QVariant &value) +v8::Local<v8::Object> QV8Engine::newVariant(const QVariant &value) { - v8::Handle<v8::Object> instance = variantWrapper()->newVariant(value); - return instance; + return variantWrapper()->newVariant(value); } QScriptPassPointer<QJSValuePrivate> QV8Engine::evaluate(v8::Handle<v8::Script> script, v8::TryCatch& tryCatch) |