Commit 9b188150 authored by Aleix Pol Gonzalez's avatar Aleix Pol Gonzalez 🐧

Properly search for extensions

parent 0f7a7628
......@@ -373,6 +373,9 @@ ResultsStream* PackageKitBackend::search(const AbstractResourcesBackend::Filters
{
if (!filter.resourceUrl.isEmpty()) {
return findResourceByPackageName(filter.resourceUrl);
} else if (!filter.extends.isEmpty()) {
const auto ext = kTransform<QVector<AbstractResource*>>(m_packages.extendedBy[filter.extends], [](AppPackageKitResource* a){ return a; });
return new ResultsStream(QStringLiteral("PackageKitStream-extends"), ext);
} else if (filter.search.isEmpty()) {
return new ResultsStream(QStringLiteral("PackageKitStream-all"), kFilter<QVector<AbstractResource*>>(m_packages.packages, [](AbstractResource* res) { return !res->isTechnical(); }));
} else {
......
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