Commit 61f822a2 authored by Aleix Pol Gonzalez's avatar Aleix Pol Gonzalez 🐧

Issue an empty search when there is an empty query

It turns out that when destroying an applistpage we often get an empty
query so we just go with it for now.

BUG: 387817
parent 6f09f357
......@@ -322,7 +322,9 @@ AggregatedResultsStream * ResourcesModel::findResourceByPackageName(const QUrl&
AggregatedResultsStream* ResourcesModel::search(const AbstractResourcesBackend::Filters& search)
{
Q_ASSERT(!search.isEmpty());
if (search.isEmpty()) {
return new AggregatedResultsStream ({new ResultsStream(QStringLiteral("emptysearch"), {})});
}
auto streams = kTransform<QSet<ResultsStream*>>(m_backends, [search](AbstractResourcesBackend* backend){ return backend->search(search); });
return new AggregatedResultsStream(streams);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment