on xenial help sign in
Remove unneeded layoutChanged signal from QSortFilterProxyModel
bb3e943Gerry Boland
Components/ApplicationsModelStageFiltered.qml−6
@@ -45,10 +45,4 @@ SortFilterProxyModel {
45 dynamicSortFilter: true
45 dynamicSortFilter: true
46 filterRole: ApplicationManager.RoleStage
46 filterRole: ApplicationManager.RoleStage
47 filterRegExp: RegExp(stage)
47 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−// }
54}
48}
plugins/Utils/qsortfilterproxymodelqml.cpp+1−7
@@ -63,13 +63,7 @@ QSortFilterProxyModelQML::setModel(QAbstractItemModel *itemModel)
63 connect(itemModel, SIGNAL(rowsInserted(QModelIndex,int,int)), SIGNAL(totalCountChanged()));
63 connect(itemModel, SIGNAL(rowsInserted(QModelIndex,int,int)), SIGNAL(totalCountChanged()));
64 connect(itemModel, SIGNAL(rowsRemoved(QModelIndex,int,int)), SIGNAL(totalCountChanged()));
64 connect(itemModel, SIGNAL(rowsRemoved(QModelIndex,int,int)), SIGNAL(totalCountChanged()));
65
65
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−
71 Q_EMIT totalCountChanged();
66 Q_EMIT totalCountChanged();
72− Q_EMIT layoutChanged();
73 Q_EMIT modelChanged();
67 Q_EMIT modelChanged();
74 }
68 }
75}
69}
@@ -158,4 +152,4 @@ QSortFilterProxyModelQML::mapToSource(int row)
158 } else {
152 } else {
159 return -1;
153 return -1;
160 }
154 }
161−}
155+}
plugins/Utils/qsortfilterproxymodelqml.h−1
@@ -54,7 +54,6 @@ Q_SIGNALS:
54 void countChanged();
54 void countChanged();
55 void invertMatchChanged(bool);
55 void invertMatchChanged(bool);
56 void modelChanged();
56 void modelChanged();
57− void layoutChanged();
58
57
59private:
58private:
60 bool m_invertMatch;
59 bool m_invertMatch;