From fdd367efd705f958af1f70413e726d337e8ec1ca Mon Sep 17 00:00:00 2001 From: Oleg Shparber Date: Fri, 28 Nov 2014 00:20:29 -0800 Subject: Add default parameter value for ExecutionEngine::newString() Change-Id: I8efbfb07ea61e2c6d03eeb79671006d209e4d48e Reviewed-by: Simon Hausmann --- src/qml/jsruntime/qv4regexpobject.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/qml/jsruntime/qv4regexpobject.cpp') diff --git a/src/qml/jsruntime/qv4regexpobject.cpp b/src/qml/jsruntime/qv4regexpobject.cpp index 7191a16235..ff78cf3e13 100644 --- a/src/qml/jsruntime/qv4regexpobject.cpp +++ b/src/qml/jsruntime/qv4regexpobject.cpp @@ -447,7 +447,7 @@ ReturnedValue RegExpPrototype::method_get_lastMatch_n(CallContext *ctx) ScopedArrayObject lastMatch(scope, static_cast(ctx->d()->engine->regExpCtor.objectValue())->lastMatch()); ScopedValue result(scope, lastMatch ? lastMatch->getIndexed(index) : Encode::undefined()); if (result->isUndefined()) - return ctx->d()->engine->newString(QString())->asReturnedValue(); + return ctx->d()->engine->newString()->asReturnedValue(); return result.asReturnedValue(); } @@ -457,7 +457,7 @@ ReturnedValue RegExpPrototype::method_get_lastParen(CallContext *ctx) ScopedArrayObject lastMatch(scope, static_cast(ctx->d()->engine->regExpCtor.objectValue())->lastMatch()); ScopedValue result(scope, lastMatch ? lastMatch->getIndexed(lastMatch->getLength() - 1) : Encode::undefined()); if (result->isUndefined()) - return ctx->d()->engine->newString(QString())->asReturnedValue(); + return ctx->d()->engine->newString()->asReturnedValue(); return result.asReturnedValue(); } -- cgit v1.2.1