Optimizing feedsmodel.

This commit is contained in:
Martin Rotter 2014-01-03 09:00:51 +01:00
parent 558b241eb4
commit f3e6a73a7b

View File

@ -203,7 +203,7 @@ QModelIndex FeedsModel::indexForItem(FeedsModelRootItem *item) const {
void FeedsModel::reloadChangedLayout(QModelIndexList list) {
while (!list.isEmpty()) {
QModelIndex indx = list.takeLast();
QModelIndex indx = list.takeFirst();
QModelIndex indx_parent = indx.parent();
// Underlying data are changed.
@ -212,7 +212,7 @@ void FeedsModel::reloadChangedLayout(QModelIndexList list) {
if (indx_parent.isValid()) {
// Make sure that data of parent are changed too.
list.append(indx_parent);
list.prepend(indx_parent);
}
}
}