summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/declarative/qml/qmlsqldatabase.cpp5
-rw-r--r--src/declarative/util/qmllistmodel.cpp1
2 files changed, 4 insertions, 2 deletions
diff --git a/src/declarative/qml/qmlsqldatabase.cpp b/src/declarative/qml/qmlsqldatabase.cpp
index be6ef16..3ddfec3 100644
--- a/src/declarative/qml/qmlsqldatabase.cpp
+++ b/src/declarative/qml/qmlsqldatabase.cpp
@@ -262,8 +262,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();
}
diff --git a/src/declarative/util/qmllistmodel.cpp b/src/declarative/util/qmllistmodel.cpp
index 2678de7..00c99f6 100644
--- a/src/declarative/util/qmllistmodel.cpp
+++ b/src/declarative/util/qmllistmodel.cpp
@@ -445,6 +445,7 @@ void QmlListModel::clear()
_root = 0;
roleStrings.clear();
emit itemsRemoved(0,cleared);
+ emit countChanged(0);
}
/*!