summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAleix Pol <[email protected]>2018-06-20 22:43:50 +0200
committerAleix Pol <[email protected]>2018-06-20 22:43:50 +0200
commit538489ec680dc08d20fc00b1dc21763f5d891eac (patch)
treedeebbf5b5f1e7137627a6f0478448b28b929760f
parent9577e7d1d333d43d899e6eca76bfb309483eb29a (diff)
Flatpak: Make sure we release every time we aquire
Otherwise it sometimes won't ever finish to update BUG: 394558
-rw-r--r--libdiscover/backends/FlatpakBackend/FlatpakBackend.cpp13
-rw-r--r--libdiscover/backends/FlatpakBackend/FlatpakBackend.h1
2 files changed, 4 insertions, 10 deletions
diff --git a/libdiscover/backends/FlatpakBackend/FlatpakBackend.cpp b/libdiscover/backends/FlatpakBackend/FlatpakBackend.cpp
index c3383c4..07d203e 100644
--- a/libdiscover/backends/FlatpakBackend/FlatpakBackend.cpp
+++ b/libdiscover/backends/FlatpakBackend/FlatpakBackend.cpp
@@ -545,14 +545,6 @@ private:
FlatpakRemote* m_remote;
};
-void FlatpakBackend::finishInitialization()
-{
- loadInstalledApps();
- checkForUpdates();
-
- acquireFetching(false);
-}
-
void FlatpakBackend::loadAppsFromAppstreamData()
{
for (auto installation : qAsConst(m_installations)) {
@@ -631,8 +623,11 @@ void FlatpakBackend::integrateRemote(FlatpakInstallation *flatpakInstallation, F
addResource(resource);
}
if (!m_refreshAppstreamMetadataJobs) {
- finishInitialization();
+ loadInstalledApps();
+ checkForUpdates();
+
}
+ acquireFetching(false);
fw->deleteLater();
});
}
diff --git a/libdiscover/backends/FlatpakBackend/FlatpakBackend.h b/libdiscover/backends/FlatpakBackend/FlatpakBackend.h
index 7cc7d90..fd70606 100644
--- a/libdiscover/backends/FlatpakBackend/FlatpakBackend.h
+++ b/libdiscover/backends/FlatpakBackend/FlatpakBackend.h
@@ -86,7 +86,6 @@ private:
FlatpakResource * addAppFromFlatpakRef(const QUrl &url);
void addResource(FlatpakResource *resource);
bool compareAppFlatpakRef(FlatpakInstallation *flatpakInstallation, FlatpakResource *resource, FlatpakInstalledRef *ref) const;
- void finishInitialization();
void loadAppsFromAppstreamData();
bool loadAppsFromAppstreamData(FlatpakInstallation *flatpakInstallation);
void loadInstalledApps();