Add asserts in GroupModel::groupAboutToRemove().

This commit is contained in:
Felix Geyer 2013-03-22 20:45:52 +01:00
parent db08058c4e
commit 7be87051ab

View File

@ -319,7 +319,9 @@ void GroupModel::groupAboutToRemove(Group* group)
Q_ASSERT(group->parentGroup());
QModelIndex parentIndex = parent(group);
Q_ASSERT(parentIndex.isValid());
int pos = group->parentGroup()->children().indexOf(group);
Q_ASSERT(pos != -1);
beginRemoveRows(parentIndex, pos, pos);
}