on xenial help sign in
Don't connect to results model change signal.
commit7802645a66322fd1e6fd6744ac71031c78d031d4 authorPawel Stolowski <pawel.stolowski@canonical.com> dateTue 24 Sep 2013, 10:19 (13 years ago) parent20f9687
2 files changed+4−7
plugins/Unity/categories.cpp+4−6 plugins/Unity/categories.h−1
plugins/Unity/categories.cpp+4−6
@@ -67,10 +67,11 @@ Categories::getResults(int index) const
6767 results->setModel(unity_results->model());
6868 } else {
6969 // No results model returned by unity core; this can be the case when the global
70− // results model of this scope became invalid in unity core. Don't set backend
70+ // results model of this scope is still not set in unity core. Don't set backend
7171 // model in DeeListModel - it will still beahve properly as an empty model. Since
72− // we're connected to the results model change signal, we'll reset category models
73− // when results model is set again.
72+ // we're connected to the category model change signal, and it is set by unity core
73+ // at the same time as results model (on channel opening), we'll reset category
74+ // results models with proper models when we're notifed again.
7475 qWarning() << "No results model for category" << categoryIndex;
7576 }
7677
@@ -109,9 +110,6 @@ Categories::setUnityScope(const unity::dash::Scope::Ptr& scope)
109110 m_categoriesChangedConnection.disconnect();
110111 m_categoriesChangedConnection =
111112 m_unityScope->categories()->model.changed.connect(sigc::mem_fun(this, &Categories::onCategoriesModelChanged));
112−
113− m_resultsChangedConnection.disconnect();
114− m_resultsChangedConnection = m_unityScope->results()->model.changed.connect(sigc::mem_fun(this, &Categories::onScopeResultsModelChanged));
115113}
116114
117115void
plugins/Unity/categories.h−1
@@ -81,7 +81,6 @@ private:
8181 QMap<QString, QAbstractItemModel*> m_overriddenCategories;
8282 mutable QMap<int, DeeListModel*> m_results;
8383 sigc::connection m_categoriesChangedConnection;
84− sigc::connection m_resultsChangedConnection;
8584};
8685
8786#endif // CATEGORIES_H