summaryrefslogtreecommitdiffstats
path: root/src/imports/folderlistmodel
diff options
context:
space:
mode:
authorMartin Jones <martin.jones@nokia.com>2011-02-28 03:15:19 (GMT)
committerMartin Jones <martin.jones@nokia.com>2011-02-28 03:29:29 (GMT)
commit6d7c12ae3f3d0eae6946524ce023ac452cf188c4 (patch)
tree8d8ecc56ba1600e0b34675c7f3661c7002505e93 /src/imports/folderlistmodel
parent39013a4a8238d522ed1d13adb25e702da9e25fc9 (diff)
downloadQt-6d7c12ae3f3d0eae6946524ce023ac452cf188c4.zip
Qt-6d7c12ae3f3d0eae6946524ce023ac452cf188c4.tar.gz
Qt-6d7c12ae3f3d0eae6946524ce023ac452cf188c4.tar.bz2
FolderListModel emitted incorrect rowsRemoved range causing crash.
beginRemoveRows() takes the first and last index as parameters, but it was passing count rather than count-1 as the last index. Change-Id: I81a6fbf085acacf5f8c1ca847b0bdc826bcf405b Task-number: QTBUG-17775 Reviewed-by: Bea Lam
Diffstat (limited to 'src/imports/folderlistmodel')
-rw-r--r--src/imports/folderlistmodel/qdeclarativefolderlistmodel.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/imports/folderlistmodel/qdeclarativefolderlistmodel.cpp b/src/imports/folderlistmodel/qdeclarativefolderlistmodel.cpp
index d5726c1..9fe01bf 100644
--- a/src/imports/folderlistmodel/qdeclarativefolderlistmodel.cpp
+++ b/src/imports/folderlistmodel/qdeclarativefolderlistmodel.cpp
@@ -365,7 +365,7 @@ void QDeclarativeFolderListModel::refresh()
{
d->folderIndex = QModelIndex();
if (d->count) {
- emit beginRemoveRows(QModelIndex(), 0, d->count);
+ emit beginRemoveRows(QModelIndex(), 0, d->count-1);
d->count = 0;
emit endRemoveRows();
}