on xenial help sign in
Tiny fixes
7850c20Michal Hruby
plugins/Unity/categories.cpp+1
@@ -162,6 +162,7 @@ void Categories::overrideResults(const QString& categoryId, QAbstractItemModel*
162 connect(model, &QObject::destroyed, this, &Categories::onOverrideModelDestroyed);
162 connect(model, &QObject::destroyed, this, &Categories::onOverrideModelDestroyed);
163 connect(model, &QAbstractItemModel::rowsInserted, this, &Categories::onRowCountChanged);
163 connect(model, &QAbstractItemModel::rowsInserted, this, &Categories::onRowCountChanged);
164 connect(model, &QAbstractItemModel::rowsRemoved, this, &Categories::onRowCountChanged);
164 connect(model, &QAbstractItemModel::rowsRemoved, this, &Categories::onRowCountChanged);
165+ connect(model, &QAbstractItemModel::modelReset, this, &Categories::onRowCountChanged);
165
166
166 // emit the dataChanged signal if the category is already in the model
167 // emit the dataChanged signal if the category is already in the model
167 for (int i = 0; i < rowCount(); i++) {
168 for (int i = 0; i < rowCount(); i++) {
plugins/Utils/qsortfilterproxymodelqml.cpp+1−1
@@ -52,7 +52,6 @@ QSortFilterProxyModelQML::setModel(QAbstractItemModel *itemModel)
52 connect(itemModel, SIGNAL(rowsInserted(QModelIndex,int,int)), SIGNAL(totalCountChanged()));
52 connect(itemModel, SIGNAL(rowsInserted(QModelIndex,int,int)), SIGNAL(totalCountChanged()));
53 connect(itemModel, SIGNAL(rowsRemoved(QModelIndex,int,int)), SIGNAL(totalCountChanged()));
53 connect(itemModel, SIGNAL(rowsRemoved(QModelIndex,int,int)), SIGNAL(totalCountChanged()));
54 Q_EMIT totalCountChanged();
54 Q_EMIT totalCountChanged();
55− Q_EMIT countChanged();
56 Q_EMIT modelChanged();
55 Q_EMIT modelChanged();
57 }
56 }
58}
57}
@@ -95,6 +94,7 @@ QSortFilterProxyModelQML::setInvertMatch(bool invertMatch)
95 if (invertMatch != m_invertMatch) {
94 if (invertMatch != m_invertMatch) {
96 m_invertMatch = invertMatch;
95 m_invertMatch = invertMatch;
97 Q_EMIT invertMatchChanged(invertMatch);
96 Q_EMIT invertMatchChanged(invertMatch);
97+ invalidateFilter();
98 }
98 }
99}
99}
100
100