summaryrefslogtreecommitdiffstats
path: root/src/declarative
diff options
context:
space:
mode:
Diffstat (limited to 'src/declarative')
-rw-r--r--src/declarative/qml/qdeclarativeextensionplugin.cpp3
-rw-r--r--src/declarative/qml/qdeclarativesqldatabase.cpp12
-rw-r--r--src/declarative/util/qdeclarativeanimation.cpp4
-rw-r--r--src/declarative/util/qdeclarativelistmodel.cpp7
4 files changed, 17 insertions, 9 deletions
diff --git a/src/declarative/qml/qdeclarativeextensionplugin.cpp b/src/declarative/qml/qdeclarativeextensionplugin.cpp
index 7617977..5b7f1e8 100644
--- a/src/declarative/qml/qdeclarativeextensionplugin.cpp
+++ b/src/declarative/qml/qdeclarativeextensionplugin.cpp
@@ -80,6 +80,9 @@ QDeclarativeExtensionPlugin::QDeclarativeExtensionPlugin(QObject *parent)
{
}
+/*!
+ Destructor.
+ */
QDeclarativeExtensionPlugin::~QDeclarativeExtensionPlugin()
{
}
diff --git a/src/declarative/qml/qdeclarativesqldatabase.cpp b/src/declarative/qml/qdeclarativesqldatabase.cpp
index 855d623..2d5f096 100644
--- a/src/declarative/qml/qdeclarativesqldatabase.cpp
+++ b/src/declarative/qml/qdeclarativesqldatabase.cpp
@@ -217,9 +217,15 @@ static QScriptValue qmlsqldatabase_executeSql(QScriptContext *context, QScriptEn
if (context->argumentCount() > 1) {
QScriptValue values = context->argument(1);
if (values.isObject()) {
- for (QScriptValueIterator it(values); it.hasNext();) {
- it.next();
- query.bindValue(it.name(),it.value().toVariant());
+ if (values.isArray()) {
+ int size = values.property(QLatin1String("length")).toInt32();
+ for (int i = 0; i < size; ++i)
+ query.bindValue(i, values.property(i).toVariant());
+ } else {
+ for (QScriptValueIterator it(values); it.hasNext();) {
+ it.next();
+ query.bindValue(it.name(),it.value().toVariant());
+ }
}
} else {
query.bindValue(0,values.toVariant());
diff --git a/src/declarative/util/qdeclarativeanimation.cpp b/src/declarative/util/qdeclarativeanimation.cpp
index 20449d7..81c548b 100644
--- a/src/declarative/util/qdeclarativeanimation.cpp
+++ b/src/declarative/util/qdeclarativeanimation.cpp
@@ -2131,10 +2131,10 @@ void QDeclarativePropertyAnimation::setProperties(const QString &prop)
}
/*!
- \qmlproperty string PropertyAnimation::property
\qmlproperty string PropertyAnimation::properties
- \qmlproperty Object PropertyAnimation::target
\qmlproperty list<Object> PropertyAnimation::targets
+ \qmlproperty string PropertyAnimation::property
+ \qmlproperty Object PropertyAnimation::target
These properties are used as a set to determine which properties should be animated.
The singular and plural forms are functionally identical, e.g.
diff --git a/src/declarative/util/qdeclarativelistmodel.cpp b/src/declarative/util/qdeclarativelistmodel.cpp
index e3f26d7..b968ca5 100644
--- a/src/declarative/util/qdeclarativelistmodel.cpp
+++ b/src/declarative/util/qdeclarativelistmodel.cpp
@@ -284,12 +284,11 @@ void ModelNode::setObjectValue(const QScriptValue& valuemap) {
}
void ModelNode::setListValue(const QScriptValue& valuelist) {
- QScriptValueIterator it(valuelist);
+ int size = valuelist.property(QString::fromLatin1("length")).toInt32();
values.clear();
- while (it.hasNext()) {
- it.next();
+ for (int i = 0; i < size; ++i) {
ModelNode *value = new ModelNode;
- QScriptValue v = it.value();
+ QScriptValue v = valuelist.property(i);
if (v.isArray()) {
value->isArray = true;
value->setListValue(v);