Commit c796ffb2 authored by Aleix Pol Gonzalez's avatar Aleix Pol Gonzalez 🐧

Use the resources model to search from the featured model

parent b9bcae02
......@@ -76,9 +76,9 @@ void FeaturedModel::setUris(const QVector<QUrl>& uris)
QSet<ResultsStream*> streams;
foreach(const auto &uri, uris) {
foreach(auto backend, ResourcesModel::global()->backends()) {
streams << backend->findResourceByPackageName(QUrl(uri.toString()));
}
AbstractResourcesBackend::Filters filter;
filter.resourceUrl = uri;
streams << ResourcesModel::global()->search(filter);
}
auto stream = new StoredResultsStream(streams);
connect(stream, &StoredResultsStream::finishedResources, this, &FeaturedModel::setResources);
......
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