]> cloud.milkyroute.net Git - dolphin.git/commit
Fix for KFileItemModel::expansionLevelsCompare
authorFrank Reininghaus <frank78ac@googlemail.com>
Mon, 15 Aug 2011 11:05:53 +0000 (13:05 +0200)
committerFrank Reininghaus <frank78ac@googlemail.com>
Mon, 15 Aug 2011 11:05:53 +0000 (13:05 +0200)
commitdd71994b6cea7730c126f0b68351a96a0c624634
tree8d70500b21572c5f8d6dc9f20926cfe1201096d0
parentc12f0f8c61d7ec269be689a42836fe4d67a96253
Fix for KFileItemModel::expansionLevelsCompare

Before this commit, expanding and collapsing folders in the details
view would lead to strange results in a folder with the items "a",
"a/a/", "a/a/1", "a/a-1/", and "a/a-1/1".  The problem was that the
comparison between "a/a/1" and "a/a-1/1" went wrong: the first
character in which the paths differ is a "/" in one of the items, such
that the code that reduces this 'index' in
KFileItemModel::expansionLevelsCompare in order to find the 'common
path' did nothing because it checked that only *one* of the two items
does not have an "/" at the position 'index'.
src/kitemviews/kfileitemmodel.cpp
src/tests/kfileitemmodeltest.cpp