Code review comment for lp:~stolowski/unity8/results-nullptr-fix

Revision history for this message
Michal Hruby (mhr3) wrote :

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 +}

If it's no longer connected shouldn't it go away?

53 + void onScopeResultsModelChanged(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 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).

« Back to merge proposal