]> cloud.milkyroute.net Git - dolphin.git/commit
Introduce a new signal "groupsChanged"
authorFrank Reininghaus <frank78ac@googlemail.com>
Sun, 4 Aug 2013 20:20:37 +0000 (22:20 +0200)
committerFrank Reininghaus <frank78ac@googlemail.com>
Sun, 4 Aug 2013 20:20:37 +0000 (22:20 +0200)
commit6524bf701a04e09ce31a7793ccccbedefc11e514
tree4b0b05283c2b072d5b6e0b44054bb687e509f8f5
parentbedf1db916ae80a3c27062cbd86f476d166fd51c
Introduce a new signal "groupsChanged"

Sometimes when items are renamed, the order of the items in the
directory is not affected, but the groups still change (simple example:
with files a, b, c, e, rename "c" to "d"). At the moment, we always emit
the itemsMoved signal in such a case to make sure that the view is
updated. However, it would be preferable if this signal was not emitted
because it can trigger some quite expensive operations which are not
needed at all.

This commit introduces a new signal groupsChanged and modifies
KFileItemModel and KItemListView such that these classes make use of it.
Some unit tests for the new functionality are included as well.

Thanks to Emmanuel Pescosta for finding a latent bug in the code which
was triggered by this change and fixed in
998954db6d53999dfa75d380cbb4ca3111589f66.

REVIEW: 111808
src/kitemviews/kfileitemmodel.cpp
src/kitemviews/kitemlistview.cpp
src/kitemviews/kitemlistview.h
src/kitemviews/kitemmodelbase.h
src/tests/kfileitemmodeltest.cpp