diff --git a/applets/kicker/plugin/appentry.cpp b/applets/kicker/plugin/appentry.cpp --- a/applets/kicker/plugin/appentry.cpp +++ b/applets/kicker/plugin/appentry.cpp @@ -137,15 +137,16 @@ return true; } +Q_GLOBAL_STATIC(AppStream::Pool, appstreamPool) + QVariantList appstreamActions(const KService::Ptr &service) { - static AppStream::Pool pool; - if (!pool.load()) { - return {}; + if (!appstreamPool.exists()) { + appstreamPool->load(); } QVariantList ret; - const auto components = pool.componentsById(service->desktopEntryName()+QLatin1String(".desktop")); + const auto components = appstreamPool->componentsById(service->desktopEntryName()+QLatin1String(".desktop")); for(const auto &component: components) { const QString componentId = component.id();