Commit a77bf20f authored by Aleix Pol Gonzalez's avatar Aleix Pol Gonzalez 🐧 Committed by Aleix Pol Gonzalez
Browse files

flatpak: Use FlatpakResource::updateFromRef for bundles too

It helps initialize the resource's fields that will be later used for
different queries. For example, it allows to look it back up after
getting the resource installed.

BUG: 458545
parent 346f7576
Pipeline #228065 passed with stage
in 2 minutes and 5 seconds
......@@ -668,6 +668,7 @@ void FlatpakBackend::addAppFromFlatpakBundle(const QUrl &url, ResultsStream *str
resource->setBundledIcon(pixmap);
}
resource->updateFromRef(FLATPAK_REF(bundleRef));
resource->setDownloadSize(0);
resource->setInstalledSize(flatpak_bundle_ref_get_installed_size(bundleRef));
resource->setPropertyState(FlatpakResource::DownloadSize, FlatpakResource::AlreadyKnown);
......@@ -676,7 +677,6 @@ void FlatpakBackend::addAppFromFlatpakBundle(const QUrl &url, ResultsStream *str
resource->setOrigin(origin.isEmpty() ? i18n("Local bundle") : origin);
resource->setResourceFile(url);
resource->setState(FlatpakResource::None);
resource->setType(FlatpakResource::DesktopApp);
if (!m_localSource) {
m_localSource.reset(new FlatpakSource(this, preferredInstallation()));
......
Supports Markdown
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