aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsruntime/qv4stringobject.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/qml/jsruntime/qv4stringobject.cpp')
-rw-r--r--src/qml/jsruntime/qv4stringobject.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/qml/jsruntime/qv4stringobject.cpp b/src/qml/jsruntime/qv4stringobject.cpp
index 829ada0c1a..6fbf1c3c85 100644
--- a/src/qml/jsruntime/qv4stringobject.cpp
+++ b/src/qml/jsruntime/qv4stringobject.cpp
@@ -218,8 +218,8 @@ static QString getThisString(ExecutionContext *ctx)
{
Scope scope(ctx);
ScopedValue t(scope, ctx->thisObject());
- if (t->isString())
- return t->stringValue()->toQString();
+ if (String *s = t->stringValue())
+ return s->toQString();
if (StringObject *thisString = t->as<StringObject>())
return thisString->d()->string->toQString();
if (t->isUndefined() || t->isNull()) {
@@ -282,13 +282,13 @@ ReturnedValue StringPrototype::method_concat(CallContext *context)
if (scope.engine->hasException)
return Encode::undefined();
- ScopedValue v(scope);
+ ScopedString s(scope);
for (int i = 0; i < context->argc(); ++i) {
- v = RuntimeHelpers::toString(scope.engine, context->args()[i]);
+ s = context->args()[i].toString(scope.engine);
if (scope.hasException())
return Encode::undefined();
- Q_ASSERT(v->isString());
- value += v->stringValue()->toQString();
+ Q_ASSERT(s->isString());
+ value += s->toQString();
}
return context->d()->engine->newString(value)->asReturnedValue();