Commit fa4f70e9 authored by Aleix Pol Gonzalez's avatar Aleix Pol Gonzalez 🐧

Flatpak: Notify about removed resources before deleting them

parent fe9895aa
......@@ -680,6 +680,7 @@ bool FlatpakBackend::loadInstalledApps(FlatpakInstallation *flatpakInstallation)
if (!resourceExists) {
addResource(resource);
} else {
emit resourceRemoved(resource);
resource->deleteLater();
}
}
......
......@@ -36,6 +36,8 @@ AbstractResource::AbstractResource(AbstractResourcesBackend* parent)
connect(this, &AbstractResource::stateChanged, this, &AbstractResource::reportNewState);
}
AbstractResource::~AbstractResource() = default;
bool AbstractResource::isTechnical() const
{
return false;
......
......@@ -101,6 +101,7 @@ class DISCOVERCOMMON_EXPORT AbstractResource : public QObject
* Constructs the AbstractResource with its corresponding backend
*/
explicit AbstractResource(AbstractResourcesBackend* parent);
~AbstractResource() override;
///used as internal identification of a resource
virtual QString packageName() const = 0;
......
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