aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsruntime/qv4stringobject.cpp
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@theqtcompany.com>2015-02-13 11:45:03 +0100
committerSimon Hausmann <simon.hausmann@theqtcompany.com>2015-04-17 17:29:16 +0000
commit5f1220a18f27a1d4409230378996cb4ae9ef4c54 (patch)
treeeeb32b8f557ac266beb2f43faea773583a86c07e /src/qml/jsruntime/qv4stringobject.cpp
parent0ca50c64b087f4affafda18c6a3ba25d734d4888 (diff)
Get rid of asStringObject()
Change-Id: Iad3afd00d2fdbd04efa4f3b841f11269ab496826 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Diffstat (limited to 'src/qml/jsruntime/qv4stringobject.cpp')
-rw-r--r--src/qml/jsruntime/qv4stringobject.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/qml/jsruntime/qv4stringobject.cpp b/src/qml/jsruntime/qv4stringobject.cpp
index 91d5bc3d78..f79abc8375 100644
--- a/src/qml/jsruntime/qv4stringobject.cpp
+++ b/src/qml/jsruntime/qv4stringobject.cpp
@@ -104,7 +104,7 @@ bool StringObject::deleteIndexedProperty(Managed *m, uint index)
{
ExecutionEngine *v4 = static_cast<StringObject *>(m)->engine();
Scope scope(v4);
- Scoped<StringObject> o(scope, m->asStringObject());
+ Scoped<StringObject> o(scope, m->as<StringObject>());
Q_ASSERT(!!o);
if (index < static_cast<uint>(o->d()->value.stringValue()->toQString().length())) {
@@ -220,7 +220,7 @@ static QString getThisString(ExecutionContext *ctx)
ScopedValue t(scope, ctx->thisObject());
if (t->isString())
return t->stringValue()->toQString();
- if (StringObject *thisString = t->asStringObject())
+ if (StringObject *thisString = t->as<StringObject>())
return thisString->d()->value.stringValue()->toQString();
if (t->isUndefined() || t->isNull()) {
scope.engine->throwTypeError();
@@ -234,7 +234,7 @@ ReturnedValue StringPrototype::method_toString(CallContext *context)
if (context->thisObject().isString())
return context->thisObject().asReturnedValue();
- StringObject *o = context->thisObject().asStringObject();
+ StringObject *o = context->thisObject().as<StringObject>();
if (!o)
return context->engine()->throwTypeError();
return o->d()->value.asReturnedValue();
@@ -470,7 +470,7 @@ ReturnedValue StringPrototype::method_replace(CallContext *ctx)
{
Scope scope(ctx);
QString string;
- if (StringObject *thisString = ctx->thisObject().asStringObject())
+ if (StringObject *thisString = ctx->thisObject().as<StringObject>())
string = thisString->d()->value.stringValue()->toQString();
else
string = ctx->thisObject().toQString();