Commit 9ce57430 authored by Aleix Pol Gonzalez's avatar Aleix Pol Gonzalez 🐧

Fix warning: use the right API to get the component desktop id

parent bc71b687
......@@ -148,8 +148,9 @@ void PackageKitBackend::reloadPackageList()
const auto pkgNames = component.packageNames();
if (pkgNames.isEmpty()) {
if (component.kind() == AppStream::Component::KindDesktopApp) {
const QString file = locateService(component.desktopId());
auto launchable = component.launchable(AppStream::Launchable::KindDesktopId);
if (component.kind() == AppStream::Component::KindDesktopApp && !launchable.entries().isEmpty()) {
const QString file = locateService(launchable.entries().constFirst());
if (!file.isEmpty()) {
auto trans = PackageKit::Daemon::searchFiles(file);
connect(trans, &PackageKit::Transaction::package, this, [trans](PackageKit::Transaction::Info info, const QString &packageID){
......
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