mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-12-15 08:29:22 -05:00
Fix bug where index is wrong when a group is moved to the end from the same parent.
This triggered the bug: group->setParent(group->parentGroup()); Then index was group->parentGroup()->children().size() instead of size()-1.
This commit is contained in:
parent
974d4f5807
commit
0d20955920
2 changed files with 14 additions and 0 deletions
|
|
@ -135,6 +135,14 @@ void TestGroup::testSignals()
|
|||
QCOMPARE(spyAboutToMove.count(), 0);
|
||||
QCOMPARE(spyMoved.count(), 0);
|
||||
|
||||
g2->setParent(root);
|
||||
QCOMPARE(spyAboutToAdd.count(), 2);
|
||||
QCOMPARE(spyAdded.count(), 2);
|
||||
QCOMPARE(spyAboutToRemove.count(), 0);
|
||||
QCOMPARE(spyRemoved.count(), 0);
|
||||
QCOMPARE(spyAboutToMove.count(), 0);
|
||||
QCOMPARE(spyMoved.count(), 0);
|
||||
|
||||
g2->setParent(root, 0);
|
||||
QCOMPARE(spyAboutToAdd.count(), 2);
|
||||
QCOMPARE(spyAdded.count(), 2);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue