Members of the KDE Community are recommended to subscribe to the kde-community mailing list at to allow them to participate in important discussions and receive other important announcements

Commit 690d62fc authored by Aleix Pol Gonzalez's avatar Aleix Pol Gonzalez 🐧

Disable the snap-backend if it failed to initialize

parent cb35c848
......@@ -47,6 +47,10 @@ SnapBackend::SnapBackend(QObject* parent)
auto request = m_client.connect();
m_valid = request->error() == QSnapdRequest::NoError;
if (!m_valid) {
qWarning() << "snap problem at initialize:" << request->errorString();
connect(m_reviews, &SnapReviewsBackend::ratingsReady, this, &AbstractResourcesBackend::emitRatingsReady);
......@@ -43,7 +43,7 @@ public:
int updatesCount() const override;
AbstractBackendUpdater* backendUpdater() const override;
AbstractReviewsBackend* reviewsBackend() const override;
bool isValid() const override { return true; } // No external file dependencies that could cause runtime errors
bool isValid() const override { return m_valid; }
QList<QAction*> messageActions() const override { return {}; }
Transaction* installApplication(AbstractResource* app) override;
......@@ -64,6 +64,7 @@ private:
StandardBackendUpdater* m_updater;
SnapReviewsBackend* m_reviews;
bool m_valid = true;
bool m_fetching = false;
QSnapdClient m_client;
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