on xenial help sign in
fix disconnect when changing the source model
commit04889a441dea3df5ef8862038df9132d1771e15f authorMichael Zanetti <michael.zanetti@canonical.com> dateThu 5 Nov 2015, 14:39 (11 years ago) parent3fe3f4b
1 file changed+3−3
plugins/Utils/applicationsfiltermodel.cpp+3−3
plugins/Utils/applicationsfiltermodel.cpp+3−3
@@ -37,10 +37,10 @@ ApplicationManagerInterface *ApplicationsFilterModel::applicationsModel() const
3737
3838void ApplicationsFilterModel::setApplicationsModel(ApplicationManagerInterface *applicationsModel)
3939{
40− if (m_appModel) {
41− disconnect(m_appModel, &ApplicationManagerInterface::countChanged, this, &ApplicationsFilterModel::countChanged);
42− }
4340 if (m_appModel != applicationsModel) {
41+ if (m_appModel) {
42+ disconnect(m_appModel, &ApplicationManagerInterface::countChanged, this, &ApplicationsFilterModel::countChanged);
43+ }
4444 m_appModel = applicationsModel;
4545 setSourceModel(m_appModel);
4646 Q_EMIT applicationsModelChanged();