summaryrefslogtreecommitdiff
path: root/src/qml/jsruntime/qv4regexpobject.cpp
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@qt.io>2016-11-24 15:49:39 +0100
committerLars Knoll <lars.knoll@qt.io>2016-11-29 20:00:03 +0000
commita36d19546891a808cf71dbb084d6d63870d2b8ec (patch)
tree37d3ed91068950aeecfeb5d4ad79c030bbe4be87 /src/qml/jsruntime/qv4regexpobject.cpp
parent6b641549536d199a0314049a34e61363bd4df7e0 (diff)
downloadqtdeclarative-a36d19546891a808cf71dbb084d6d63870d2b8ec.tar.gz
Clean up some duplicated methods
Change-Id: Iad64dd2c330ca85a28f8f5c776b0ede623203558 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'src/qml/jsruntime/qv4regexpobject.cpp')
-rw-r--r--src/qml/jsruntime/qv4regexpobject.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/qml/jsruntime/qv4regexpobject.cpp b/src/qml/jsruntime/qv4regexpobject.cpp
index 4022d98c3f..c35286bd3a 100644
--- a/src/qml/jsruntime/qv4regexpobject.cpp
+++ b/src/qml/jsruntime/qv4regexpobject.cpp
@@ -262,7 +262,7 @@ void RegExpCtor::construct(const Managed *, Scope &scope, CallData *callData)
bool ignoreCase = false;
bool multiLine = false;
if (!f->isUndefined()) {
- f = RuntimeHelpers::toString(scope.engine, f);
+ f = f->toString(scope.engine);
if (scope.hasException()) {
scope.result = Encode::undefined();
return;
@@ -356,7 +356,7 @@ ReturnedValue RegExpPrototype::method_exec(CallContext *ctx)
return ctx->engine()->throwTypeError();
ScopedValue arg(scope, ctx->argument(0));
- arg = RuntimeHelpers::toString(scope.engine, arg);
+ arg = arg->toString(scope.engine);
if (scope.hasException())
return Encode::undefined();
QString s = arg->stringValue()->toQString();