diff options
author | Lars Knoll <lars.knoll@theqtcompany.com> | 2015-01-02 14:37:26 +0100 |
---|---|---|
committer | Lars Knoll <lars.knoll@digia.com> | 2015-01-09 10:27:55 +0100 |
commit | 7041eb353a4ad416f51245cc17342e16b3a02a9b (patch) | |
tree | 5870620166ae82d23f0e22ce64c8b9ed4788f39f /src/imports | |
parent | 8a779f65ae3fb830415b9f39d803be57b7f56d50 (diff) |
Move the variant conversion methods from qv8engine to qv4::ExecutionEngine
Change-Id: Ibd529ae5cc3ba06f46152e9daa9119a4e7a2561c
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'src/imports')
-rw-r--r-- | src/imports/localstorage/plugin.cpp | 8 | ||||
-rw-r--r-- | src/imports/xmllistmodel/qqmlxmllistmodel.cpp | 2 |
2 files changed, 5 insertions, 5 deletions
diff --git a/src/imports/localstorage/plugin.cpp b/src/imports/localstorage/plugin.cpp index 2df859c104..726b7d8874 100644 --- a/src/imports/localstorage/plugin.cpp +++ b/src/imports/localstorage/plugin.cpp @@ -226,7 +226,7 @@ static ReturnedValue qmlsqldatabase_rows_index(QQmlSqlDatabaseWrapper *r, Execut for (int ii = 0; ii < record.count(); ++ii) { QVariant v = record.value(ii); ScopedString s(scope, v4->newIdentifier(record.fieldName(ii))); - ScopedValue val(scope, v.isNull() ? Encode::null() : QV8Engine::fromVariant(v4, v)); + ScopedValue val(scope, v.isNull() ? Encode::null() : QV4::ExecutionEngine::fromVariant(v4, v)); row->put(s.getPointer(), val); } if (hasProperty) @@ -291,7 +291,7 @@ static ReturnedValue qmlsqldatabase_executeSql(CallContext *ctx) quint32 size = array->getLength(); QV4::ScopedValue v(scope); for (quint32 ii = 0; ii < size; ++ii) - query.bindValue(ii, QV8Engine::toVariant(scope.engine, (v = array->getIndexed(ii)), -1)); + query.bindValue(ii, QV4::ExecutionEngine::toVariant(scope.engine, (v = array->getIndexed(ii)), -1)); } else if (values->asObject()) { ScopedObject object(scope, values); ObjectIterator it(scope, object, ObjectIterator::WithProtoChain|ObjectIterator::EnumerableOnly); @@ -301,7 +301,7 @@ static ReturnedValue qmlsqldatabase_executeSql(CallContext *ctx) key = it.nextPropertyName(val); if (key->isNull()) break; - QVariant v = QV8Engine::toVariant(scope.engine, val, -1); + QVariant v = QV4::ExecutionEngine::toVariant(scope.engine, val, -1); if (key->isString()) { query.bindValue(key->stringValue()->toQString(), v); } else { @@ -310,7 +310,7 @@ static ReturnedValue qmlsqldatabase_executeSql(CallContext *ctx) } } } else { - query.bindValue(0, QV8Engine::toVariant(scope.engine, values, -1)); + query.bindValue(0, QV4::ExecutionEngine::toVariant(scope.engine, values, -1)); } } if (query.exec()) { diff --git a/src/imports/xmllistmodel/qqmlxmllistmodel.cpp b/src/imports/xmllistmodel/qqmlxmllistmodel.cpp index 7cd1a2f651..b3fa14c662 100644 --- a/src/imports/xmllistmodel/qqmlxmllistmodel.cpp +++ b/src/imports/xmllistmodel/qqmlxmllistmodel.cpp @@ -925,7 +925,7 @@ QQmlV4Handle QQuickXmlListModel::get(int index) const ScopedValue value(scope); for (int ii = 0; ii < d->roleObjects.count(); ++ii) { name = v4engine->newIdentifier(d->roleObjects[ii]->name()); - value = QV8Engine::fromVariant(v4engine, d->data.value(ii).value(index)); + value = QV4::ExecutionEngine::fromVariant(v4engine, d->data.value(ii).value(index)); o->insertMember(name.getPointer(), value); } |