From 33593f00e84e6fb05191e9bb88000566c0c96426 Mon Sep 17 00:00:00 2001 From: Lars Knoll Date: Wed, 7 May 2014 13:33:24 +0200 Subject: Get rid of StringRef Remove the Ref classes, as they won't be required anymore once Managed and Managed::Data are separated. Change-Id: Ic6bec2d5b4ecf2595ce129dbb45bbf6a385138a5 Reviewed-by: Simon Hausmann --- src/imports/localstorage/plugin.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/imports/localstorage') diff --git a/src/imports/localstorage/plugin.cpp b/src/imports/localstorage/plugin.cpp index eeb835dbd3..03175fdf95 100644 --- a/src/imports/localstorage/plugin.cpp +++ b/src/imports/localstorage/plugin.cpp @@ -66,7 +66,7 @@ using namespace QV4; #define V4THROW_SQL(error, desc) { \ QV4::Scoped v(scope, scope.engine->newString(desc)); \ QV4::Scoped ex(scope, scope.engine->newErrorObject(v)); \ - ex->put(QV4::ScopedString(scope, scope.engine->newIdentifier(QStringLiteral("code"))), QV4::ScopedValue(scope, Primitive::fromInt32(error))); \ + ex->put(QV4::ScopedString(scope, scope.engine->newIdentifier(QStringLiteral("code"))).getPointer(), QV4::ScopedValue(scope, Primitive::fromInt32(error))); \ ctx->throwError(ex); \ return Encode::undefined(); \ } @@ -74,7 +74,7 @@ using namespace QV4; #define V4THROW_SQL2(error, desc) { \ QV4::Scoped v(scope, scope.engine->newString(desc)); \ QV4::Scoped ex(scope, scope.engine->newErrorObject(v)); \ - ex->put(QV4::ScopedString(scope, scope.engine->newIdentifier(QStringLiteral("code"))), QV4::ScopedValue(scope, Primitive::fromInt32(error))); \ + ex->put(QV4::ScopedString(scope, scope.engine->newIdentifier(QStringLiteral("code"))).getPointer(), QV4::ScopedValue(scope, Primitive::fromInt32(error))); \ args->setReturnValue(ctx->throwError(ex)); \ return; \ } @@ -238,7 +238,7 @@ static ReturnedValue qmlsqldatabase_rows_index(QQmlSqlDatabaseWrapperRef r, Exec QVariant v = record.value(ii); ScopedString s(scope, v4->newIdentifier(record.fieldName(ii))); ScopedValue val(scope, v.isNull() ? Encode::null() : v8->fromVariant(v)); - row->put(s, val); + row->put(s.getPointer(), val); } if (hasProperty) *hasProperty = true; @@ -338,9 +338,9 @@ static ReturnedValue qmlsqldatabase_executeSql(CallContext *ctx) // XXX optimize ScopedString s(scope); ScopedValue v(scope); - resultObject->put((s = scope.engine->newIdentifier("rowsAffected")), (v = Primitive::fromInt32(query.numRowsAffected()))); - resultObject->put((s = scope.engine->newIdentifier("insertId")), (v = engine->toString(query.lastInsertId().toString()))); - resultObject->put((s = scope.engine->newIdentifier("rows")), rows); + resultObject->put((s = scope.engine->newIdentifier("rowsAffected")).getPointer(), (v = Primitive::fromInt32(query.numRowsAffected()))); + resultObject->put((s = scope.engine->newIdentifier("insertId")).getPointer(), (v = engine->toString(query.lastInsertId().toString()))); + resultObject->put((s = scope.engine->newIdentifier("rows")).getPointer(), rows); } else { err = true; } -- cgit v1.2.3