]> cloud.milkyroute.net Git - dolphin.git/commit
Test signal emission on selection changes
authorFrank Reininghaus <frank78ac@googlemail.com>
Thu, 11 Aug 2011 12:20:12 +0000 (14:20 +0200)
committerFrank Reininghaus <frank78ac@googlemail.com>
Thu, 11 Aug 2011 12:23:53 +0000 (14:23 +0200)
commit9b83d15be44d698c26b55bf8cbc126321f5a4e9b
tree20f0ae54a5562cd5a58fad653d9c03c168f5b582
parent01ff60edeea76f77a5c4684d1f674efb81418faa
Test signal emission on selection changes

This commit adds a unit test that changes the selection in various
ways, verifies the result and checks that the selection manager's
selectionChanged signal has been emitted correctly. The test is
data-driven, so I hope that most further testing needs can be
fulfilled by adding new test data.

Moreover, I changed selectedItems() such that the anchored
selection is only taken into account if anchor and current item
are different. The reason is that in some situation the anchor
should not be selected initially (i.e., if an already selected
item is Control-clicked). If the anchor should be selected from
the beginning, it must be selected manually.
src/kitemviews/kitemlistselectionmanager.cpp
src/tests/kitemlistselectionmanagertest.cpp