From 7b6d356d07facd3bbd16b3a95aaef3b2e52860c9 Mon Sep 17 00:00:00 2001 From: Erik Verbruggen Date: Wed, 23 Jan 2013 11:04:48 +0100 Subject: [PATCH] Fix compiler warnings. The second call method in EvalFunction was hiding an overloaded virtual function, hence the name change. Change-Id: Ic333d1e7359df97ff25dace87c80b40a939a4cea Reviewed-by: Lars Knoll --- qmljs_runtime.cpp | 2 +- qv4dateobject.cpp | 1 + qv4globalobject.cpp | 4 ++-- qv4globalobject.h | 2 +- qv4jsonobject.cpp | 1 + 5 files changed, 6 insertions(+), 4 deletions(-) diff --git a/qmljs_runtime.cpp b/qmljs_runtime.cpp index b6750ff..dddf89a 100644 --- a/qmljs_runtime.cpp +++ b/qmljs_runtime.cpp @@ -742,7 +742,7 @@ Value __qmljs_call_activation_property(ExecutionContext *context, String *name, Value thisObject = base ? Value::fromObject(base) : Value::undefinedValue(); if (o == context->engine->evalFunction && name == context->engine->id_eval) - return static_cast(o)->call(context, thisObject, args, argc, true); + return static_cast(o)->evalCall(context, thisObject, args, argc, true); return o->call(context, thisObject, args, argc); } diff --git a/qv4dateobject.cpp b/qv4dateobject.cpp index a6e5119..3038e72 100644 --- a/qv4dateobject.cpp +++ b/qv4dateobject.cpp @@ -802,6 +802,7 @@ Value DatePrototype::method_UTC(ExecutionContext *ctx) Value DatePrototype::method_now(ExecutionContext *ctx) { + Q_UNUSED(ctx); double t = currentTime(); return Value::fromDouble(t); } diff --git a/qv4globalobject.cpp b/qv4globalobject.cpp index 1857eee..67c1759 100644 --- a/qv4globalobject.cpp +++ b/qv4globalobject.cpp @@ -313,7 +313,7 @@ EvalFunction::EvalFunction(ExecutionContext *scope) name = scope->engine->id_eval; } -Value EvalFunction::call(ExecutionContext *context, Value /*thisObject*/, Value *args, int argc, bool directCall) +Value EvalFunction::evalCall(ExecutionContext *context, Value /*thisObject*/, Value *args, int argc, bool directCall) { if (argc < 1) return Value::undefinedValue(); @@ -363,7 +363,7 @@ Value EvalFunction::call(ExecutionContext *context, Value /*thisObject*/, Value Value EvalFunction::call(ExecutionContext *context, Value thisObject, Value *args, int argc) { // indirect call - return call(context, thisObject, args, argc, false); + return evalCall(context, thisObject, args, argc, false); } QQmlJS::VM::Function *EvalFunction::parseSource(QQmlJS::VM::ExecutionContext *ctx, diff --git a/qv4globalobject.h b/qv4globalobject.h index 84668cf..2072227 100644 --- a/qv4globalobject.h +++ b/qv4globalobject.h @@ -58,7 +58,7 @@ struct EvalFunction : FunctionObject bool inheritContext); virtual Value call(ExecutionContext *context, Value thisObject, Value *args, int argc); - Value call(ExecutionContext *context, Value thisObject, Value *args, int argc, bool directCall); + Value evalCall(ExecutionContext *context, Value thisObject, Value *args, int argc, bool directCall); }; struct GlobalFunctions diff --git a/qv4jsonobject.cpp b/qv4jsonobject.cpp index 77645d2..d8e793e 100644 --- a/qv4jsonobject.cpp +++ b/qv4jsonobject.cpp @@ -103,6 +103,7 @@ Value JsonObject::method_parse(ExecutionContext *ctx) Value JsonObject::method_stringify(ExecutionContext *ctx) { + Q_UNUSED(ctx); assert(!"Not implemented"); } -- 2.7.4