summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/declarative/util/qdeclarativelistmodel.cpp2
-rw-r--r--src/declarative/util/qdeclarativelistmodelworkeragent.cpp7
2 files changed, 2 insertions, 7 deletions
diff --git a/src/declarative/util/qdeclarativelistmodel.cpp b/src/declarative/util/qdeclarativelistmodel.cpp
index 61e49ce..824e1b5 100644
--- a/src/declarative/util/qdeclarativelistmodel.cpp
+++ b/src/declarative/util/qdeclarativelistmodel.cpp
@@ -483,7 +483,7 @@ void QDeclarativeListModel::append(const QScriptValue& valuemap)
qmlInfo(this) << tr("append: value is not an object");
return;
}
-
+
insert(count(), valuemap);
}
diff --git a/src/declarative/util/qdeclarativelistmodelworkeragent.cpp b/src/declarative/util/qdeclarativelistmodelworkeragent.cpp
index ee43447..2951262 100644
--- a/src/declarative/util/qdeclarativelistmodelworkeragent.cpp
+++ b/src/declarative/util/qdeclarativelistmodelworkeragent.cpp
@@ -160,9 +160,6 @@ void QDeclarativeListModelWorkerAgent::insert(int index, const QScriptValue &val
QScriptValue QDeclarativeListModelWorkerAgent::get(int index) const
{
- if (index < 0 || index >= count())
- return m_engine->undefinedValue();
-
return m_copy->get(index);
}
@@ -206,7 +203,7 @@ bool QDeclarativeListModelWorkerAgent::event(QEvent *e)
FlatListModel *orig = m_orig->m_flat;
FlatListModel *copy = s->list->m_flat;
if (!orig || !copy) {
- qWarning("QML List worker: cannot synchronize lists");
+ qWarning("QML ListModel worker: sync() failed");
return QObject::event(e);
}
orig->m_roles = copy->m_roles;
@@ -233,8 +230,6 @@ bool QDeclarativeListModelWorkerAgent::event(QEvent *e)
if (cc)
emit m_orig->countChanged(m_copy->count());
-
- //qDebug() << "------sync():" << m_copy->count() << s->list->count() << m_orig->count();
}
}