diff options
-rw-r--r-- | src/declarative/qml/qmlsqldatabase.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/declarative/qml/qmlsqldatabase.cpp b/src/declarative/qml/qmlsqldatabase.cpp index 8c4c7bf..46c9cf6 100644 --- a/src/declarative/qml/qmlsqldatabase.cpp +++ b/src/declarative/qml/qmlsqldatabase.cpp @@ -260,8 +260,9 @@ static QScriptValue qmlsqldatabase_change_version(QScriptContext *context, QScri instance.setProperty(QLatin1String("executeSql"), engine->newFunction(qmlsqldatabase_executeSql,1)); QScriptValue tx = engine->newVariant(instance,qVariantFromValue(db)); - if (from_version!=context->thisObject().property(QLatin1String("version")).toString()) { - THROW_SQL(2,QmlEngine::tr("Version mismatch")); + QString foundvers = context->thisObject().property(QLatin1String("version")).toString(); + if (from_version!=foundvers) { + THROW_SQL(2,QmlEngine::tr("Version mismatch: expected %1, found %2").arg(from_version).arg(foundvers)); return engine->undefinedValue(); } |