Fixed QDeclarativeContactsModel trying to insert nonexistent rows.
authorMiikka Heikkinen <miikka.heikkinen@digia.com>
Wed, 12 Oct 2011 13:09:30 +0000 (16:09 +0300)
committerMiikka Heikkinen <miikka.heikkinen@digia.com>
Wed, 12 Oct 2011 13:10:48 +0000 (16:10 +0300)
commit7ba84cdf8e83a14920c1e8ddaf3bb2c28261e5ac
treeee0dc1c4723c85d11812f12045bce18e6b2bf787
parent04e69de9617d2e182c9296f6f66a1ec255b8619d
Fixed QDeclarativeContactsModel trying to insert nonexistent rows.

QDeclarativeContactModel::requestUpdated() didn't check for the case
where there are no rows to insert to an empty model. Combined with the
bug that it reported one more row to beginInsertRows call than it
actually was inserting, this broke the model.

Task-number: MOBILITY-2968, QT-5314
Reviewed-by: Tomi Vihria
plugins/declarative/contacts/qdeclarativecontactmodel.cpp