Commit 8857d4fc authored by Aleix Pol Gonzalez's avatar Aleix Pol Gonzalez 🐧

Fix warning, don't catch object we don't need

parent 400b0d7e
...@@ -220,9 +220,9 @@ KNSResource* KNSBackend::resourceForEntry(const KNSCore::EntryInternal& entry) ...@@ -220,9 +220,9 @@ KNSResource* KNSBackend::resourceForEntry(const KNSCore::EntryInternal& entry)
void KNSBackend::receivedEntries(const KNSCore::EntryInternal::List& entries) void KNSBackend::receivedEntries(const KNSCore::EntryInternal::List& entries)
{ {
m_responsePending = false; m_responsePending = false;
const auto filtered = kFilter<KNSCore::EntryInternal::List>(entries, [](const KNSCore::EntryInternal& entry){ return entry.isValid(); });
const auto filtered = kFilter<KNSCore::EntryInternal::List>(entries, [this](const KNSCore::EntryInternal& entry){ return entry.isValid(); });
const auto resources = kTransform<QVector<AbstractResource*>>(filtered, [this](const KNSCore::EntryInternal& entry){ return resourceForEntry(entry); }); const auto resources = kTransform<QVector<AbstractResource*>>(filtered, [this](const KNSCore::EntryInternal& entry){ return resourceForEntry(entry); });
if (!resources.isEmpty()) { if (!resources.isEmpty()) {
Q_EMIT receivedResources(resources); Q_EMIT receivedResources(resources);
} else { } 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