mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-12-04 15:39:34 +01:00
Add asserts in GroupModel::groupAboutToRemove().
This commit is contained in:
@@ -319,7 +319,9 @@ void GroupModel::groupAboutToRemove(Group* group)
|
|||||||
Q_ASSERT(group->parentGroup());
|
Q_ASSERT(group->parentGroup());
|
||||||
|
|
||||||
QModelIndex parentIndex = parent(group);
|
QModelIndex parentIndex = parent(group);
|
||||||
|
Q_ASSERT(parentIndex.isValid());
|
||||||
int pos = group->parentGroup()->children().indexOf(group);
|
int pos = group->parentGroup()->children().indexOf(group);
|
||||||
|
Q_ASSERT(pos != -1);
|
||||||
|
|
||||||
beginRemoveRows(parentIndex, pos, pos);
|
beginRemoveRows(parentIndex, pos, pos);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user