diff options
Diffstat (limited to 'src/declarative/qml/qdeclarativesqldatabase.cpp')
-rw-r--r-- | src/declarative/qml/qdeclarativesqldatabase.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/declarative/qml/qdeclarativesqldatabase.cpp b/src/declarative/qml/qdeclarativesqldatabase.cpp index e97836f..7d3450d 100644 --- a/src/declarative/qml/qdeclarativesqldatabase.cpp +++ b/src/declarative/qml/qdeclarativesqldatabase.cpp @@ -244,7 +244,7 @@ static QScriptValue qmlsqldatabase_executeSql(QScriptContext *context, QScriptEn if (!qmlengine->sqlQueryClass) qmlengine->sqlQueryClass = new QDeclarativeSqlQueryScriptClass(engine); QScriptValue rows = engine->newObject(qmlengine->sqlQueryClass); - rows.setData(engine->newVariant(qVariantFromValue(query))); + rows.setData(engine->newVariant(QVariant::fromValue(query))); rows.setProperty(QLatin1String("item"), engine->newFunction(qmlsqldatabase_item,1), QScriptValue::SkipInEnumeration); result.setProperty(QLatin1String("rows"),rows); result.setProperty(QLatin1String("rowsAffected"),query.numRowsAffected()); @@ -282,7 +282,7 @@ static QScriptValue qmlsqldatabase_change_version(QScriptContext *context, QScri QScriptValue instance = engine->newObject(); instance.setProperty(QLatin1String("executeSql"), engine->newFunction(qmlsqldatabase_executeSql,1)); - QScriptValue tx = engine->newVariant(instance,qVariantFromValue(db)); + QScriptValue tx = engine->newVariant(instance,QVariant::fromValue(db)); QString foundvers = context->thisObject().property(QLatin1String("version")).toString(); if (from_version!=foundvers) { @@ -326,7 +326,7 @@ static QScriptValue qmlsqldatabase_transaction_shared(QScriptContext *context, Q QScriptValue instance = engine->newObject(); instance.setProperty(QLatin1String("executeSql"), engine->newFunction(readOnly ? qmlsqldatabase_executeSql_readonly : qmlsqldatabase_executeSql,1)); - QScriptValue tx = engine->newVariant(instance,qVariantFromValue(db)); + QScriptValue tx = engine->newVariant(instance,QVariant::fromValue(db)); db.transaction(); callback.call(QScriptValue(), QScriptValueList() << tx); @@ -411,7 +411,7 @@ static QScriptValue qmlsqldatabase_open_sync(QScriptContext *context, QScriptEng instance.setProperty(QLatin1String("version"), version, QScriptValue::ReadOnly); instance.setProperty(QLatin1String("changeVersion"), engine->newFunction(qmlsqldatabase_change_version,3)); - QScriptValue result = engine->newVariant(instance,qVariantFromValue(database)); + QScriptValue result = engine->newVariant(instance,QVariant::fromValue(database)); if (created && dbcreationCallback.isFunction()) { dbcreationCallback.call(QScriptValue(), QScriptValueList() << result); |