on xenial help sign in
Remove unneeded layoutChanged signal from QSortFilterProxyModel
commitbb3e943931213c708bc1c41c6ab1cf8d2ccd0376 authorGerry Boland <gerry.boland@canonical.com> dateMon 9 Sep 2013, 12:14 (13 years ago) parent758a195
3 files changed+1−14
Components/ApplicationsModelStageFiltered.qml−6 plugins/Utils/qsortfilterproxymodelqml.cpp+1−7 plugins/Utils/qsortfilterproxymodelqml.h−1
Components/ApplicationsModelStageFiltered.qml−6
@@ -45,10 +45,4 @@ SortFilterProxyModel {
4545 dynamicSortFilter: true
4646 filterRole: ApplicationManager.RoleStage
4747 filterRegExp: RegExp(stage)
48−
49−// onLayoutChanged: {
50−// for (var i=0, len=root.count; i<len; i++) {
51−// print(i, get(i).appId);
52−// }
53−// }
5448}
plugins/Utils/qsortfilterproxymodelqml.cpp+1−7
@@ -63,13 +63,7 @@ QSortFilterProxyModelQML::setModel(QAbstractItemModel *itemModel)
6363 connect(itemModel, SIGNAL(rowsInserted(QModelIndex,int,int)), SIGNAL(totalCountChanged()));
6464 connect(itemModel, SIGNAL(rowsRemoved(QModelIndex,int,int)), SIGNAL(totalCountChanged()));
6565
66− connect(itemModel, SIGNAL(modelReset()), SIGNAL(layoutChanged()));
67− connect(itemModel, SIGNAL(rowsInserted(QModelIndex,int,int)), SIGNAL(layoutChanged()));
68− connect(itemModel, SIGNAL(rowsRemoved(QModelIndex,int,int)), SIGNAL(layoutChanged()));
69− connect(itemModel, SIGNAL(rowsMoved(QModelIndex,int,int,QModelIndex,int)), SIGNAL(layoutChanged()));
70−
7166 Q_EMIT totalCountChanged();
72− Q_EMIT layoutChanged();
7367 Q_EMIT modelChanged();
7468 }
7569}
@@ -158,4 +152,4 @@ QSortFilterProxyModelQML::mapToSource(int row)
158152 } else {
159153 return -1;
160154 }
161−}
155+}
plugins/Utils/qsortfilterproxymodelqml.h−1
@@ -54,7 +54,6 @@ Q_SIGNALS:
5454 void countChanged();
5555 void invertMatchChanged(bool);
5656 void modelChanged();
57− void layoutChanged();
5857
5958private:
6059 bool m_invertMatch;