Optimizing feedsmodel.
This commit is contained in:
parent
558b241eb4
commit
f3e6a73a7b
@ -203,7 +203,7 @@ QModelIndex FeedsModel::indexForItem(FeedsModelRootItem *item) const {
|
|||||||
|
|
||||||
void FeedsModel::reloadChangedLayout(QModelIndexList list) {
|
void FeedsModel::reloadChangedLayout(QModelIndexList list) {
|
||||||
while (!list.isEmpty()) {
|
while (!list.isEmpty()) {
|
||||||
QModelIndex indx = list.takeLast();
|
QModelIndex indx = list.takeFirst();
|
||||||
QModelIndex indx_parent = indx.parent();
|
QModelIndex indx_parent = indx.parent();
|
||||||
|
|
||||||
// Underlying data are changed.
|
// Underlying data are changed.
|
||||||
@ -212,7 +212,7 @@ void FeedsModel::reloadChangedLayout(QModelIndexList list) {
|
|||||||
|
|
||||||
if (indx_parent.isValid()) {
|
if (indx_parent.isValid()) {
|
||||||
// Make sure that data of parent are changed too.
|
// Make sure that data of parent are changed too.
|
||||||
list.append(indx_parent);
|
list.prepend(indx_parent);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user