Commit b4ee04e8 authored by Aleix Pol Gonzalez's avatar Aleix Pol Gonzalez 🐧
Browse files

Fix filtering

Don't try to match when the URL isn't adequate.
Also check the state.
parent 0709cf85
......@@ -96,9 +96,16 @@ int DummyBackend::updatesCount() const
ResultsStream* DummyBackend::search(const AbstractResourcesBackend::Filters& filter)
QVector<AbstractResource*> ret;
if (!filter.resourceUrl.isEmpty() && filter.resourceUrl.scheme() == QLatin1String("dummy"))
if (!filter.resourceUrl.isEmpty())
return findResourceByPackageName(filter.resourceUrl);
else foreach(AbstractResource* r, m_resources) {
if (r->isTechnical() && filter.state != AbstractResource::Upgradeable) {
if (r->state() < filter.state)
if(r->name().contains(, Qt::CaseInsensitive) || r->comment().contains(, Qt::CaseInsensitive))
ret += r;
Supports Markdown
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