@@ -21,6 +21,7 @@
22#include "categories.h"
22#include "categories.h"
23#include "categoryresults.h"
23#include "categoryresults.h"
25// TODO: use something from libunity once it's public
26// TODO: use something from libunity once it's public
26enum CategoryColumn {
27enum CategoryColumn {
@@ -62,7 +63,17 @@ Categories::getResults(int index) const
63 unsigned categoryIndex = static_cast<unsigned>(index);
64 unsigned categoryIndex = static_cast<unsigned>(index);
64 auto unity_results = m_unityScope->GetResultsForCategory(categoryIndex);
65 auto unity_results = m_unityScope->GetResultsForCategory(categoryIndex);
65− results->setModel(unity_results->model());
67+ results->setModel(unity_results->model());
69+ // No results model returned by unity core; this can be the case when the global
70+ // results model of this scope is still not set in unity core. Don't set backend
71+ // model in DeeListModel - it will still beahve properly as an empty model. Since
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.
75+ qWarning() << "No results model for category" << categoryIndex;
67 m_results.insert(index, results);
78 m_results.insert(index, results);