diff options
author | Lars Knoll <lars.knoll@digia.com> | 2013-10-01 16:11:55 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-10-02 16:07:33 +0200 |
commit | c1d66eec1dbaf9034e03e3efa0403a774c764373 (patch) | |
tree | fa185761604cc636e77ff5f4eda2462783bc18e6 /src/qml/jsruntime/qv4runtime.cpp | |
parent | d49cc03df130353665edd89112fd4e1f3cdab9b6 (diff) |
Cleanup API of Safe<T>
Don't have an implicit cast operator to Returned<T>
anymore, and return a T* from the operator->()
Change-Id: If4165071b986bfc84a157560d94d39c2dcfbc9e1
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'src/qml/jsruntime/qv4runtime.cpp')
-rw-r--r-- | src/qml/jsruntime/qv4runtime.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/qml/jsruntime/qv4runtime.cpp b/src/qml/jsruntime/qv4runtime.cpp index 95fe39ba5a..6002346678 100644 --- a/src/qml/jsruntime/qv4runtime.cpp +++ b/src/qml/jsruntime/qv4runtime.cpp @@ -424,14 +424,14 @@ Returned<String> *__qmljs_convert_to_string(ExecutionContext *ctx, const ValueRe case Value::Empty_Type: Q_ASSERT(!"empty Value encountered"); case Value::Undefined_Type: - return ctx->engine->id_undefined; + return ctx->engine->id_undefined.ret(); case Value::Null_Type: - return ctx->engine->id_null; + return ctx->engine->id_null.ret(); case Value::Boolean_Type: if (value->booleanValue()) - return ctx->engine->id_true; + return ctx->engine->id_true.ret(); else - return ctx->engine->id_false; + return ctx->engine->id_false.ret(); case Value::Managed_Type: if (value->isString()) return value->stringValue()->asReturned<String>(); @@ -737,7 +737,7 @@ ReturnedValue __qmljs_call_global_lookup(ExecutionContext *context, uint index, if (!o) context->throwTypeError(); - if (o.getPointer() == context->engine->evalFunction && l->name->isEqualTo(context->engine->id_eval)) + if (o.getPointer() == context->engine->evalFunction && l->name->equals(context->engine->id_eval)) return static_cast<EvalFunction *>(o.getPointer())->evalCall(callData, true); return o->call(callData); @@ -763,7 +763,7 @@ ReturnedValue __qmljs_call_activation_property(ExecutionContext *context, const context->throwTypeError(msg); } - if (o == context->engine->evalFunction && name->isEqualTo(context->engine->id_eval)) { + if (o == context->engine->evalFunction && name->equals(context->engine->id_eval)) { return static_cast<EvalFunction *>(o)->evalCall(callData, true); } |