36 +void Categories::onScopeResultsModelChanged(unity::glib::Object<DeeModel> /* model */)
37 +{
38 + // if scope results model changes, we need to reset all category models
39 + onCategoriesModelChanged(m_unityScope->categories()->model());
40 +}
Why explicit setModel(NULL)? We are dealing with new CategoryResults object here, the model is NULL. As for cached results, I expect we will be notifed by signal, and onCategoriesModelChanged will reset all categories?
If setModel(NULL) is not called, the UI will keep displaying the old model (do we want that?), if it is, it will behave the same way as if an empty model was present (but won't react to searches).
36 +void Categories: :onScopeResults ModelChanged( unity:: glib::Object< DeeModel> /* model */) elChanged( m_unityScope- >categories( )->model( ));
37 +{
38 + // if scope results model changes, we need to reset all category models
39 + onCategoriesMod
40 +}
If it's no longer connected shouldn't it go away?
53 + void onScopeResultsM odelChanged( unity:: glib::Object< DeeModel> model);
ditto
Why explicit setModel(NULL)? We are dealing with new CategoryResults object here, the model is NULL. As for cached results, I expect we will be notifed by signal, and onCategoriesMod elChanged will reset all categories?
If setModel(NULL) is not called, the UI will keep displaying the old model (do we want that?), if it is, it will behave the same way as if an empty model was present (but won't react to searches).