aboutsummaryrefslogtreecommitdiffstats
path: root/src/imports
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@digia.com>2013-09-11 21:48:23 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-09-18 13:13:36 +0200
commit6c9f1c8ed93374c16ca6ac540f39e98b451be0d8 (patch)
tree476d0046c6016a8cd62bfc29ed9697d98e98f738 /src/imports
parentbdb27b96acbd38531879378c48959a5a1cd60963 (diff)
Use a ReturnedValue for Managed::getIndexed()
Change-Id: I0371ed21c4ef99564d3ffa1082dd109e890a78bf Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'src/imports')
-rw-r--r--src/imports/localstorage/plugin.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/imports/localstorage/plugin.cpp b/src/imports/localstorage/plugin.cpp
index 2cb62eb5c0..de89f120bc 100644
--- a/src/imports/localstorage/plugin.cpp
+++ b/src/imports/localstorage/plugin.cpp
@@ -105,7 +105,7 @@ public:
~QQmlSqlDatabaseWrapper() {
}
- static Value getIndexed(Managed *m, uint index, bool *hasProperty);
+ static ReturnedValue getIndexed(Managed *m, uint index, bool *hasProperty);
static void destroy(Managed *that) {
static_cast<QQmlSqlDatabaseWrapper *>(that)->~QQmlSqlDatabaseWrapper();
}
@@ -217,13 +217,13 @@ static Value qmlsqldatabase_rows_index(QQmlSqlDatabaseWrapper *r, ExecutionEngin
}
}
-Value QQmlSqlDatabaseWrapper::getIndexed(Managed *m, uint index, bool *hasProperty)
+ReturnedValue QQmlSqlDatabaseWrapper::getIndexed(Managed *m, uint index, bool *hasProperty)
{
QQmlSqlDatabaseWrapper *r = m->as<QQmlSqlDatabaseWrapper>();
if (!r || r->type != QQmlSqlDatabaseWrapper::Rows)
return Object::getIndexed(m, index, hasProperty);
- return qmlsqldatabase_rows_index(r, m->engine(), index, hasProperty);
+ return qmlsqldatabase_rows_index(r, m->engine(), index, hasProperty).asReturnedValue();
}
static Value qmlsqldatabase_rows_item(SimpleCallContext *ctx)
@@ -265,7 +265,7 @@ static Value qmlsqldatabase_executeSql(SimpleCallContext *ctx)
if (ArrayObject *array = values.asArrayObject()) {
quint32 size = array->arrayLength();
for (quint32 ii = 0; ii < size; ++ii)
- query.bindValue(ii, engine->toVariant(array->getIndexed(ii), -1));
+ query.bindValue(ii, engine->toVariant(QV4::Value::fromReturnedValue(array->getIndexed(ii)), -1));
} else if (Object *object = values.asObject()) {
ObjectIterator it(object, ObjectIterator::WithProtoChain|ObjectIterator::EnumerableOnly);
while (1) {