Commit 6b35e8e0 authored by Aleix Pol Gonzalez's avatar Aleix Pol Gonzalez 🐧

Snap: Port use of deprecated API

parent a9f7809b
......@@ -47,15 +47,6 @@ SnapBackend::SnapBackend(QObject* parent)
, m_updater(new StandardBackendUpdater(this))
, m_reviews(new SnapReviewsBackend(this))
{
{
auto request = m_client.connect();
request->runSync();
m_valid = request->error() == QSnapdRequest::NoError;
if (!m_valid) {
qWarning() << "snap problem at initialize:" << request->errorString();
return;
}
}
connect(m_reviews, &SnapReviewsBackend::ratingsReady, this, &AbstractResourcesBackend::emitRatingsReady);
//make sure we populate the installed resources first
......@@ -80,7 +71,7 @@ ResultsStream * SnapBackend::search(const AbstractResourcesBackend::Filters& fil
} else if (filters.category && filters.category->isAddons()) {
return voidStream();
} else if (filters.state >= AbstractResource::Installed) {
return populate(m_client.list());
return populate(m_client.getSnaps());
} else if (!filters.search.isEmpty()) {
return populate(m_client.find(QSnapdClient::FindFlag::None, filters.search));
}
......
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