aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsruntime/qv4context.cpp
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@digia.com>2013-10-01 16:11:55 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-10-02 16:07:33 +0200
commitc1d66eec1dbaf9034e03e3efa0403a774c764373 (patch)
treefa185761604cc636e77ff5f4eda2462783bc18e6 /src/qml/jsruntime/qv4context.cpp
parentd49cc03df130353665edd89112fd4e1f3cdab9b6 (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/qv4context.cpp')
-rw-r--r--src/qml/jsruntime/qv4context.cpp24
1 files changed, 12 insertions, 12 deletions
diff --git a/src/qml/jsruntime/qv4context.cpp b/src/qml/jsruntime/qv4context.cpp
index 674dd46e96..0e08f025c2 100644
--- a/src/qml/jsruntime/qv4context.cpp
+++ b/src/qml/jsruntime/qv4context.cpp
@@ -286,7 +286,7 @@ bool ExecutionContext::deleteProperty(const StringRef name)
return w->withObject->deleteProperty(name);
} else if (ctx->type == Type_CatchContext) {
CatchContext *c = static_cast<CatchContext *>(ctx);
- if (c->exceptionVarName->stringValue()->isEqualTo(name))
+ if (c->exceptionVarName->isEqualTo(name))
return false;
} else if (ctx->type >= Type_CallContext) {
CallContext *c = static_cast<CallContext *>(ctx);
@@ -361,7 +361,7 @@ void ExecutionContext::setProperty(const StringRef name, const ValueRef value)
w->put(name, value);
return;
}
- } else if (ctx->type == Type_CatchContext && static_cast<CatchContext *>(ctx)->exceptionVarName->stringValue()->isEqualTo(name)) {
+ } else if (ctx->type == Type_CatchContext && static_cast<CatchContext *>(ctx)->exceptionVarName->isEqualTo(name)) {
static_cast<CatchContext *>(ctx)->exceptionValue = *value;
return;
} else {
@@ -389,7 +389,7 @@ void ExecutionContext::setProperty(const StringRef name, const ValueRef value)
}
}
}
- if (strictMode || name->isEqualTo(engine->id_this)) {
+ if (strictMode || name->equals(engine->id_this)) {
ScopedValue n(scope, name.asReturnedValue());
throwReferenceError(n);
}
@@ -402,7 +402,7 @@ ReturnedValue ExecutionContext::getProperty(const StringRef name)
ScopedValue v(scope);
name->makeIdentifier();
- if (name->isEqualTo(engine->id_this))
+ if (name->equals(engine->id_this))
return callData->thisObject.asReturnedValue();
bool hasWith = false;
@@ -422,7 +422,7 @@ ReturnedValue ExecutionContext::getProperty(const StringRef name)
else if (ctx->type == Type_CatchContext) {
hasCatchScope = true;
CatchContext *c = static_cast<CatchContext *>(ctx);
- if (c->exceptionVarName->stringValue()->isEqualTo(name))
+ if (c->exceptionVarName->isEqualTo(name))
return c->exceptionValue.asReturnedValue();
}
@@ -444,7 +444,7 @@ ReturnedValue ExecutionContext::getProperty(const StringRef name)
return v.asReturnedValue();
}
if (f->function && f->function->isNamedExpression()
- && name->isEqualTo(f->function->name))
+ && name->equals(f->function->name))
return f.asReturnedValue();
}
@@ -467,7 +467,7 @@ ReturnedValue ExecutionContext::getPropertyNoThrow(const StringRef name)
ScopedValue v(scope);
name->makeIdentifier();
- if (name->isEqualTo(engine->id_this))
+ if (name->equals(engine->id_this))
return callData->thisObject.asReturnedValue();
bool hasWith = false;
@@ -487,7 +487,7 @@ ReturnedValue ExecutionContext::getPropertyNoThrow(const StringRef name)
else if (ctx->type == Type_CatchContext) {
hasCatchScope = true;
CatchContext *c = static_cast<CatchContext *>(ctx);
- if (c->exceptionVarName->stringValue()->isEqualTo(name))
+ if (c->exceptionVarName->isEqualTo(name))
return c->exceptionValue.asReturnedValue();
}
@@ -509,7 +509,7 @@ ReturnedValue ExecutionContext::getPropertyNoThrow(const StringRef name)
return v.asReturnedValue();
}
if (f->function && f->function->isNamedExpression()
- && name->isEqualTo(f->function->name))
+ && name->equals(f->function->name))
return f.asReturnedValue();
}
@@ -531,7 +531,7 @@ ReturnedValue ExecutionContext::getPropertyAndBase(const StringRef name, ObjectR
base = (Object *)0;
name->makeIdentifier();
- if (name->isEqualTo(engine->id_this))
+ if (name->equals(engine->id_this))
return callData->thisObject.asReturnedValue();
bool hasWith = false;
@@ -552,7 +552,7 @@ ReturnedValue ExecutionContext::getPropertyAndBase(const StringRef name, ObjectR
else if (ctx->type == Type_CatchContext) {
hasCatchScope = true;
CatchContext *c = static_cast<CatchContext *>(ctx);
- if (c->exceptionVarName->stringValue()->isEqualTo(name))
+ if (c->exceptionVarName->isEqualTo(name))
return c->exceptionValue.asReturnedValue();
}
@@ -577,7 +577,7 @@ ReturnedValue ExecutionContext::getPropertyAndBase(const StringRef name, ObjectR
}
}
if (f->function && f->function->isNamedExpression()
- && name->isEqualTo(f->function->name))
+ && name->equals(f->function->name))
return c->function->asReturnedValue();
}