]> cloud.milkyroute.net Git - dolphin.git/commit
Add unit test for the calculation of "name" groups with expanded items
authorFrank Reininghaus <frank78ac@googlemail.com>
Mon, 30 Sep 2013 22:09:25 +0000 (00:09 +0200)
committerFrank Reininghaus <frank78ac@googlemail.com>
Mon, 30 Sep 2013 22:09:25 +0000 (00:09 +0200)
commit4cb0a239e51749c6e6099fd056309f9a81b8a481
treeb31dccfcd0db576bf5497a4eeeb14ad8ab35e15f
parentc44b9e685e55c419be2d139744233d232da82898
Add unit test for the calculation of "name" groups with expanded items

This prevents a possible regression that would have happened with the
first version of https://git.reviewboard.kde.org/r/112725/

The problem was that isChildItem(int index) would return "false"
incorrectly when the QHash for that item was not initialized yet. The
grouping code would then try to read the "text" from the empty QHash,
which yielded an empty QString, and then accessing the first character
of that string caused a crash.
src/tests/kfileitemmodeltest.cpp