summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMateu Batle <mateu.batle@collabora.co.uk>2011-04-29 09:25:22 -0500
committerMateu Batle <mateu.batle@collabora.co.uk>2011-04-29 09:25:22 -0500
commit3343cfda3b20e27603ba3f90e84df7484b749628 (patch)
treec9bd5782c2d6ca099824cb6bc5abba345ff16b42
parent3d2892601f00476ce6d5c08a367dd3aa43979ee6 (diff)
Fix off by one error in condition to delete elements
-rw-r--r--TelepathyQt4Yell/Models/abstract-conversation-model.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/TelepathyQt4Yell/Models/abstract-conversation-model.cpp b/TelepathyQt4Yell/Models/abstract-conversation-model.cpp
index d3dea7d..35ec4d5 100644
--- a/TelepathyQt4Yell/Models/abstract-conversation-model.cpp
+++ b/TelepathyQt4Yell/Models/abstract-conversation-model.cpp
@@ -255,7 +255,7 @@ bool AbstractConversationModel::removeRows(int row, int count, const QModelIndex
{
if (row >= 0 && count > 0 && (row + count) <= mPriv->mItems.count()) {
beginRemoveRows(parent, row, row + count - 1);
- while (count-- >= 0) {
+ while (count-- > 0) {
mPriv->mItems.removeAt(row);
}
endRemoveRows();