aboutsummaryrefslogtreecommitdiffstats
path: root/src/imports/localstorage
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@digia.com>2014-05-07 13:33:24 +0200
committerSimon Hausmann <simon.hausmann@digia.com>2014-07-22 13:49:12 +0200
commit33593f00e84e6fb05191e9bb88000566c0c96426 (patch)
tree127877f1719689659a8ec6cea669ad5d38ec0903 /src/imports/localstorage
parent9afc7d9a53ad86e548e2d239ff012bed15eb52ba (diff)
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 <simon.hausmann@digia.com>
Diffstat (limited to 'src/imports/localstorage')
-rw-r--r--src/imports/localstorage/plugin.cpp12
1 files changed, 6 insertions, 6 deletions
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<String> v(scope, scope.engine->newString(desc)); \
QV4::Scoped<Object> 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<String> v(scope, scope.engine->newString(desc)); \
QV4::Scoped<Object> 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;
}