diff options
author | Martin Jones <martin.jones@nokia.com> | 2011-02-28 03:15:19 (GMT) |
---|---|---|
committer | Martin Jones <martin.jones@nokia.com> | 2011-02-28 03:29:29 (GMT) |
commit | 6d7c12ae3f3d0eae6946524ce023ac452cf188c4 (patch) | |
tree | 8d8ecc56ba1600e0b34675c7f3661c7002505e93 /src/imports/folderlistmodel | |
parent | 39013a4a8238d522ed1d13adb25e702da9e25fc9 (diff) | |
download | Qt-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.cpp | 2 |
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(); } |