diff -Nru plasma-discover-5.27.11/debian/changelog plasma-discover-5.27.11/debian/changelog --- plasma-discover-5.27.11/debian/changelog 2024-03-17 07:20:26.000000000 +0000 +++ plasma-discover-5.27.11/debian/changelog 2024-03-17 07:20:26.000000000 +0000 @@ -1,4 +1,4 @@ -plasma-discover (5.27.11-0ubuntu1~ubuntu22.04~ppa2) jammy; urgency=high +plasma-discover (5.27.11-0ubuntu1~ubuntu22.04~ppa3) jammy; urgency=high [ Scarlett Moore ] * New upstream release (5.27.11) diff -Nru plasma-discover-5.27.11/debian/control plasma-discover-5.27.11/debian/control --- plasma-discover-5.27.11/debian/control 2024-03-17 07:20:26.000000000 +0000 +++ plasma-discover-5.27.11/debian/control 2024-03-17 07:20:26.000000000 +0000 @@ -13,7 +13,7 @@ gettext, kirigami2-dev (>= 5.102.0~), kuserfeedback-dev, - libappstreamqt5-dev (>= 1.0.0), + libappstreamqt-dev (>= 0.15.3~), libcurl4-gnutls-dev, libdebconf-kde-dev (>= 1.0.0), libflatpak-dev (>= 0.11.8~) [linux-any], diff -Nru plasma-discover-5.27.11/debian/patches/revert_2b7c8508b.patch plasma-discover-5.27.11/debian/patches/revert_2b7c8508b.patch --- plasma-discover-5.27.11/debian/patches/revert_2b7c8508b.patch 1970-01-01 00:00:00.000000000 +0000 +++ plasma-discover-5.27.11/debian/patches/revert_2b7c8508b.patch 2024-03-17 07:20:26.000000000 +0000 @@ -0,0 +1,743 @@ +commit 926349ee1e7af339f44b412c301170e3834dee21 +Author: Rik Mills +Date: Fri Dec 8 11:05:54 2023 +0000 + + Revert "AppStream 1.0: Use #ifdef to support both stable and 0.x versions" + + This reverts commit 2b7c8508b407453e6b6f1f5f52c75f1575c5821f. + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 898c5f2ce..f66a3ec26 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -30,19 +30,8 @@ find_package(PkgConfig REQUIRED) + find_package(KF5 ${KF5_MIN_VERSION} REQUIRED CoreAddons Config Crash DBusAddons I18n Archive XmlGui KIO Declarative KCMUtils IdleTime Notifications Purpose) + find_package(KF5Kirigami2 2.7.0) + +-find_package(AppStreamQt5 1.0 CONFIG) +-if (AppStreamQt5_FOUND) +- add_definitions(-DDISCOVER_USE_STABLE_APPSTREAM) +- set(DISCOVER_AppStreamQt_FOUND ${AppStreamQt5_FOUND}) +- set(DISCOVER_AppStreamQt_VERSION ${AppStreamQt5_VERSION}) +- set(DISCOVER_AppStreamQt_PACKAGE_NAME AppStreamQt5) +-else() +- find_package(AppStreamQt 0.15.3 CONFIG REQUIRED) +- set(DISCOVER_AppStreamQt_FOUND ${AppStreamQt_FOUND}) +- set(DISCOVER_AppStreamQt_VERSION ${AppStreamQt_VERSION}) +- set(DISCOVER_AppStreamQt_PACKAGE_NAME AppStreamQt) +-endif() + find_package(packagekitqt5 1.0.1 CONFIG) ++find_package(AppStreamQt 0.15.3 CONFIG REQUIRED) + find_package(KF5Attica 5.23 CONFIG) + find_package(KF5NewStuff 5.53 CONFIG) + +@@ -96,7 +85,7 @@ set_package_properties(packagekitqt5 PROPERTIES + URL "https://www.freedesktop.org/software/PackageKit/" + PURPOSE "Required to build the PackageKit backend" + TYPE OPTIONAL) +-set_package_properties(${DISCOVER_AppStreamQt_PACKAGE_NAME} PROPERTIES ++set_package_properties(AppStreamQt PROPERTIES + DESCRIPTION "Library that lists Appstream resources" + URL "https://www.freedesktop.org" + PURPOSE "Required to build the PackageKit, Flatpak and Snap backends" +diff --git a/libdiscover/appstream/AppStreamUtils.cpp b/libdiscover/appstream/AppStreamUtils.cpp +index 77f117be4..94f030c9d 100644 +--- a/libdiscover/appstream/AppStreamUtils.cpp ++++ b/libdiscover/appstream/AppStreamUtils.cpp +@@ -7,21 +7,11 @@ + #include "AppStreamUtils.h" + + #include "utils.h" +- +-#ifdef DISCOVER_USE_STABLE_APPSTREAM +-#include +-#include +-#include +-#include +-#include +-#else + #include + #include + #include + #include + #include +-#endif +- + #include + #include + #include +@@ -45,20 +35,10 @@ QUrl AppStreamUtils::imageOfKind(const QList &images, AppStrea + + QString AppStreamUtils::changelogToHtml(const AppStream::Component &appdata) + { +-#if ASQ_CHECK_VERSION(1, 0, 0) +- const auto releases = appdata.releasesPlain(); +-#else +- const auto releases = appdata.releases(); +-#endif +- if (releases.isEmpty()) { ++ if (appdata.releases().isEmpty()) + return {}; +- } + +-#if ASQ_CHECK_VERSION(1, 0, 0) +- const auto release = releases.indexSafe(0).value(); +-#else +- const auto release = releases.constFirst(); +-#endif ++ const auto release = appdata.releases().constFirst(); + if (release.description().isEmpty()) + return {}; + +@@ -69,11 +49,7 @@ QString AppStreamUtils::changelogToHtml(const AppStream::Component &appdata) + + Screenshots AppStreamUtils::fetchScreenshots(const AppStream::Component &appdata) + { +-#if ASQ_CHECK_VERSION(1, 0, 0) +- const auto appdataScreenshots = appdata.screenshotsAll(); +-#else + const auto appdataScreenshots = appdata.screenshots(); +-#endif + Screenshots ret; + ret.reserve(appdataScreenshots.size()); + for (const AppStream::Screenshot &s : appdataScreenshots) { +@@ -155,18 +131,10 @@ QString AppStreamUtils::versionString(const QString &version, const AppStream::C + if (version.isEmpty()) { + return {}; + } else { +-#if ASQ_CHECK_VERSION(1, 0, 0) +- if (appdata.releasesPlain().isEmpty()) { ++ if (appdata.releases().isEmpty()) + return version; +- } +- auto release = appdata.releasesPlain().indexSafe(0).value(); +-#else +- if (appdata.releases().isEmpty()) { +- return version; +- } +- auto release = appdata.releases().constFirst(); +-#endif + ++ auto release = appdata.releases().constFirst(); + if (release.timestamp().isValid() && version.startsWith(release.version())) { + QLocale l; + return i18n("%1, released on %2", version, l.toString(release.timestamp().date(), QLocale::ShortFormat)); +@@ -288,11 +256,7 @@ QList AppStreamUtils::componentsByCategories(AppStream::Po + { + QList ret; + for (const auto &categoryName : cat->involvedCategories()) { +-#if ASQ_CHECK_VERSION(1, 0, 0) +- ret += pool->componentsByCategories({categoryName}).toList(); +-#else + ret += pool->componentsByCategories({categoryName}); +-#endif + } + kRemoveDuplicates(ret, kind); + return ret; +diff --git a/libdiscover/appstream/AppStreamUtils.h b/libdiscover/appstream/AppStreamUtils.h +index ebb5eccaa..383e55aa8 100644 +--- a/libdiscover/appstream/AppStreamUtils.h ++++ b/libdiscover/appstream/AppStreamUtils.h +@@ -6,16 +6,9 @@ + + #pragma once + +-#ifdef DISCOVER_USE_STABLE_APPSTREAM +-#include +-#include +-#include +-#else + #include + #include + #include +-#endif +- + #include + #include + #include +diff --git a/libdiscover/backends/CMakeLists.txt b/libdiscover/backends/CMakeLists.txt +index 7305fdbad..bd3a03256 100644 +--- a/libdiscover/backends/CMakeLists.txt ++++ b/libdiscover/backends/CMakeLists.txt +@@ -8,11 +8,11 @@ function(add_unit_test name) + Qt::Test Qt::Core ${EXTRA_LIBS}) + endfunction() + +-if(KF5Attica_FOUND AND KF5NewStuff_FOUND AND DISCOVER_AppStreamQt_FOUND) ++if(KF5Attica_FOUND AND KF5NewStuff_FOUND AND AppStreamQt_FOUND) + add_subdirectory(KNSBackend) + endif() + +-if(packagekitqt5_FOUND AND DISCOVER_AppStreamQt_FOUND) ++if(packagekitqt5_FOUND AND AppStreamQt_FOUND) + add_subdirectory(PackageKitBackend) + endif() + +@@ -22,10 +22,10 @@ if(BUILD_DummyBackend) + endif() + + option(BUILD_FlatpakBackend "Build Flatpak support" "ON") +-if(Flatpak_FOUND AND DISCOVER_AppStreamQt_FOUND AND BUILD_FlatpakBackend) ++if(Flatpak_FOUND AND AppStreamQt_FOUND AND BUILD_FlatpakBackend) + add_subdirectory(FlatpakBackend) + elseif(BUILD_FlatpakBackend) +- message(WARNING "BUILD_FlatpakBackend enabled but Flatpak=${Flatpak_FOUND} or AppStreamQt=${DISCOVER_AppStreamQt_FOUND} not found") ++ message(WARNING "BUILD_FlatpakBackend enabled but Flatpak=${Flatpak_FOUND} or AppStreamQt=${AppStreamQt_FOUND} not found") + endif() + + find_package(Snapd) +@@ -41,7 +41,7 @@ if(BUILD_SteamOSBackend) + endif() + + option(BUILD_SnapBackend "Build Snap support." "ON") +-if(BUILD_SnapBackend AND DISCOVER_AppStreamQt_FOUND AND Snapd_FOUND) ++if(BUILD_SnapBackend AND AppStreamQt_FOUND AND Snapd_FOUND) + add_subdirectory(SnapBackend) + endif() + +diff --git a/libdiscover/backends/FlatpakBackend/FlatpakBackend.cpp b/libdiscover/backends/FlatpakBackend/FlatpakBackend.cpp +index ef133ccf9..99488469b 100644 +--- a/libdiscover/backends/FlatpakBackend/FlatpakBackend.cpp ++++ b/libdiscover/backends/FlatpakBackend/FlatpakBackend.cpp +@@ -20,21 +20,12 @@ + #include + #include + +-#ifdef DISCOVER_USE_STABLE_APPSTREAM +-#include +-#include +-#include +-#include +-#include +-#include +-#else + #include + #include + #include + #include + #include + #include +-#endif + + #include + #include +@@ -168,29 +159,17 @@ public: + + QList componentsByName(const QString &name) + { +- auto comps = m_pool->componentsById(name); +- if (!comps.isEmpty()) { +-#if ASQ_CHECK_VERSION(1, 0, 0) +- return comps.toList(); +-#else ++ QList comps = m_pool->componentsById(name); ++ if (!comps.isEmpty()) + return comps; +-#endif +- } + + comps = m_pool->componentsByProvided(AppStream::Provided::KindId, name); +- +-#if ASQ_CHECK_VERSION(1, 0, 0) +- return comps.toList(); +-#else + return comps; +-#endif + } + + QList componentsByFlatpakId(const QString &ref) + { +-#if ASQ_CHECK_VERSION(1, 0, 0) +- QList comps = m_pool->componentsByBundleId(AppStream::Bundle::KindFlatpak, ref, false).toList(); +-#elif ASQ_CHECK_VERSION(0, 16, 0) ++#if ASQ_CHECK_VERSION(0, 16, 0) + QList comps = m_pool->componentsByBundleId(AppStream::Bundle::KindFlatpak, ref, false); + #else + QList comps = m_pool->components(); +@@ -201,11 +180,8 @@ public: + #endif + if (!comps.isEmpty()) + return comps; +-#if ASQ_CHECK_VERSION(1, 0, 0) +- comps = m_pool->componentsByProvided(AppStream::Provided::KindId, ref.section('/', 1, 1)).toList(); +-#else ++ + comps = m_pool->componentsByProvided(AppStream::Provided::KindId, ref.section('/', 1, 1)); +-#endif + return comps; + } + +@@ -298,11 +274,7 @@ static std::optional metadataFromBytes(GBytes *appstreamGz, + gconstpointer data = g_bytes_get_data(appstream, &len); + + AppStream::Metadata metadata; +-#if ASQ_CHECK_VERSION(0, 16, 0) +- metadata.setFormatStyle(AppStream::Metadata::FormatStyleCatalog); +-#else + metadata.setFormatStyle(AppStream::Metadata::FormatStyleCollection); +-#endif + AppStream::Metadata::MetadataError error = metadata.parse(QString::fromUtf8((char *)data, len), AppStream::Metadata::FormatKindXml); + if (error != AppStream::Metadata::MetadataErrorNoError) { + qWarning() << "Failed to parse appstream metadata: " << error; +@@ -507,11 +479,7 @@ FlatpakResource *FlatpakBackend::getAppForInstalledRef(FlatpakInstallation *inst + g_autoptr(GBytes) metadata = flatpak_installed_ref_load_appdata(ref, 0, 0); + if (metadata) { + auto meta = metadataFromBytes(metadata, m_cancellable); +-#if ASQ_CHECK_VERSION(1, 0, 0) +- comps = meta->components().toList(); +-#else + comps = meta->components(); +-#endif + } + } + +@@ -658,11 +626,7 @@ void FlatpakBackend::addAppFromFlatpakBundle(const QUrl &url, ResultsStream *str + return; + } + +-#if ASQ_CHECK_VERSION(1, 0, 0) +- const QList components = metadata->components().toList(); +-#else + const QList components = metadata->components(); +-#endif + if (components.size()) { + asComponent = components.first(); + } else { +@@ -813,11 +777,7 @@ AppStream::Component fetchComponentFromRemote(const QSettings &settings, GCancel + AppStream::Pool pool; + #ifdef APPSTREAM_NEW_POOL_API + pool.setLoadStdDataLocations(false); +-#if ASQ_CHECK_VERSION(0, 16, 0) +- pool.addExtraDataLocation(appstreamLocation, AppStream::Metadata::FormatStyleCatalog); +-#else + pool.addExtraDataLocation(appstreamLocation, AppStream::Metadata::FormatStyleCollection); +-#endif + #else + pool.clearMetadataLocations(); + pool.addMetadataLocation(appstreamLocation); +@@ -835,11 +795,7 @@ AppStream::Component fetchComponentFromRemote(const QSettings &settings, GCancel + } + + // TODO optimise, this lookup should happen in libappstream +-#if ASQ_CHECK_VERSION(1, 0, 0) +- auto comps = pool.components().toList(); +-#else + auto comps = pool.components(); +-#endif + comps = kFilter>(comps, [name, branch](const AppStream::Component &component) { + const QString id = component.bundle(AppStream::Bundle::KindFlatpak).id(); + // app/app.getspace.Space/x86_64/stable +@@ -1123,11 +1079,7 @@ void FlatpakBackend::createPool(QSharedPointer source) + + #ifdef APPSTREAM_NEW_POOL_API + pool->setLoadStdDataLocations(false); +-#if ASQ_CHECK_VERSION(0, 16, 0) +- pool->addExtraDataLocation(appstreamDirPath, AppStream::Metadata::FormatStyleCatalog); +-#else + pool->addExtraDataLocation(appstreamDirPath, AppStream::Metadata::FormatStyleCollection); +-#endif + #else + pool->clearMetadataLocations(); + pool->addMetadataLocation(appstreamDirPath); +@@ -1606,25 +1558,12 @@ ResultsStream *FlatpakBackend::search(const AbstractResourcesBackend::Filters &f + for (const auto &source : qAsConst(m_flatpakSources)) { + QList resources; + if (source->m_pool) { +- QList components; +- if (!filter.search.isEmpty()) { +-#if ASQ_CHECK_VERSION(1, 0, 0) +- components = source->m_pool->search(filter.search).toList(); +-#else +- components = source->m_pool->search(filter.search); +-#endif ++ const auto a = !filter.search.isEmpty() ? source->m_pool->search(filter.search) + #if ASQ_CHECK_VERSION(0, 15, 6) +- } else if (filter.category) { +- components = AppStreamUtils::componentsByCategories(source->m_pool, filter.category, AppStream::Bundle::KindFlatpak); ++ : filter.category ? AppStreamUtils::componentsByCategories(source->m_pool, filter.category, AppStream::Bundle::KindFlatpak) + #endif +- } else { +-#if ASQ_CHECK_VERSION(1, 0, 0) +- components = source->m_pool->components().toList(); +-#else +- components = source->m_pool->components(); +-#endif +- } +- resources = kTransform>(components, [this, &source](const auto &comp) { ++ : source->m_pool->components(); ++ resources = kTransform>(a, [this, &source](const auto &comp) { + return resourceForComponent(comp, source); + }); + } else { +diff --git a/libdiscover/backends/FlatpakBackend/FlatpakBackend.h b/libdiscover/backends/FlatpakBackend/FlatpakBackend.h +index f205db80d..66188095a 100644 +--- a/libdiscover/backends/FlatpakBackend/FlatpakBackend.h ++++ b/libdiscover/backends/FlatpakBackend/FlatpakBackend.h +@@ -14,11 +14,7 @@ + #include + #include + +-#ifdef DISCOVER_USE_STABLE_APPSTREAM +-#include +-#else + #include +-#endif + + #include "flatpak-helper.h" + +diff --git a/libdiscover/backends/FlatpakBackend/FlatpakResource.cpp b/libdiscover/backends/FlatpakBackend/FlatpakResource.cpp +index 544047c31..7ed905ead 100644 +--- a/libdiscover/backends/FlatpakBackend/FlatpakResource.cpp ++++ b/libdiscover/backends/FlatpakBackend/FlatpakResource.cpp +@@ -13,21 +13,9 @@ + + #include + +-#ifdef DISCOVER_USE_STABLE_APPSTREAM +-#include +-#include +-#include +-#include +-#include +-#include +-#else + #include +-#include + #include + #include +-#include +-#endif +- + #include + + #include +@@ -36,6 +24,7 @@ + #include + #include + ++#include + #include + #include + #include +@@ -124,11 +113,7 @@ QList FlatpakResource::addonsInformation() + QString FlatpakResource::availableVersion() const + { + if (m_availableVersion.isEmpty()) { +-#if ASQ_CHECK_VERSION(1, 0, 0) +- const auto releases = m_appdata.releasesPlain().entries(); +-#else + const auto releases = m_appdata.releases(); +-#endif + if (!releases.isEmpty()) { + auto latestVersion = releases.constFirst().version(); + for (const auto &release : releases) { +@@ -664,13 +649,8 @@ QUrl FlatpakResource::url() const + + QDate FlatpakResource::releaseDate() const + { +-#if ASQ_CHECK_VERSION(1, 0, 0) +- if (const auto optional = m_appdata.releasesPlain().indexSafe(0); optional.has_value()) { +- auto release = optional.value(); +-#else +- if (const auto releases = m_appdata.releases(); !releases.isEmpty()) { +- auto release = releases.constFirst(); +-#endif ++ if (!m_appdata.releases().isEmpty()) { ++ auto release = m_appdata.releases().constFirst(); + return release.timestamp().date(); + } + +@@ -693,11 +673,7 @@ QString FlatpakResource::sourceIcon() const + + QString FlatpakResource::author() const + { +-#if ASQ_CHECK_VERSION(1, 0, 0) +- QString name = m_appdata.developer().name(); +-#else + QString name = m_appdata.developerName(); +-#endif + + if (name.isEmpty()) { + name = m_appdata.projectGroup(); +@@ -735,13 +711,8 @@ QString FlatpakResource::versionString() + if (ref) { + version = flatpak_installed_ref_get_appdata_version(ref); + } +-#if ASQ_CHECK_VERSION(1, 0, 0) +- } else if (!m_appdata.releasesPlain().isEmpty()) { +- const auto release = m_appdata.releasesPlain().indexSafe(0).value(); +-#else + } else if (!m_appdata.releases().isEmpty()) { +- const auto release = m_appdata.releases().constFirst(); +-#endif ++ auto release = m_appdata.releases().constFirst(); + version = release.version(); + } else { + version = m_id.branch; +diff --git a/libdiscover/backends/FlatpakBackend/FlatpakResource.h b/libdiscover/backends/FlatpakBackend/FlatpakResource.h +index 072008b96..06e1b030a 100644 +--- a/libdiscover/backends/FlatpakBackend/FlatpakResource.h ++++ b/libdiscover/backends/FlatpakBackend/FlatpakResource.h +@@ -12,11 +12,7 @@ + #include "FlatpakPermission.h" + #include "flatpak-helper.h" + +-#ifdef DISCOVER_USE_STABLE_APPSTREAM +-#include +-#else + #include +-#endif + + #include + #include +diff --git a/libdiscover/backends/PackageKitBackend/AppPackageKitResource.cpp b/libdiscover/backends/PackageKitBackend/AppPackageKitResource.cpp +index 2ea8362ba..510266dfd 100644 +--- a/libdiscover/backends/PackageKitBackend/AppPackageKitResource.cpp ++++ b/libdiscover/backends/PackageKitBackend/AppPackageKitResource.cpp +@@ -6,22 +6,10 @@ + + #include "AppPackageKitResource.h" + #include "utils.h" +- +-#ifdef DISCOVER_USE_STABLE_APPSTREAM +-#include +-#include +-#include +-#include +-#include +-#include +-#else + #include + #include + #include + #include +-#include +-#endif +- + #include + #include + #include +@@ -248,13 +236,8 @@ QString AppPackageKitResource::versionString() + + QDate AppPackageKitResource::releaseDate() const + { +-#if ASQ_CHECK_VERSION(1, 0, 0) +- if (const auto optional = m_appdata.releasesPlain().indexSafe(0); optional.has_value()) { +- auto release = optional.value(); +-#else + if (!m_appdata.releases().isEmpty()) { +- const auto release = m_appdata.releases().constFirst(); +-#endif ++ auto release = m_appdata.releases().constFirst(); + return release.timestamp().date(); + } + +@@ -263,11 +246,7 @@ QDate AppPackageKitResource::releaseDate() const + + QString AppPackageKitResource::author() const + { +-#if ASQ_CHECK_VERSION(1, 0, 0) +- QString name = m_appdata.developer().name(); +-#else + QString name = m_appdata.developerName(); +-#endif + + if (name.isEmpty()) { + name = m_appdata.projectGroup(); +diff --git a/libdiscover/backends/PackageKitBackend/PackageKitBackend.cpp b/libdiscover/backends/PackageKitBackend/PackageKitBackend.cpp +index 186cb30a6..6902318a3 100644 +--- a/libdiscover/backends/PackageKitBackend/PackageKitBackend.cpp ++++ b/libdiscover/backends/PackageKitBackend/PackageKitBackend.cpp +@@ -13,19 +13,9 @@ + #include "PKTransaction.h" + #include "PackageKitSourcesBackend.h" + #include "PackageKitUpdater.h" +- +-#ifdef DISCOVER_USE_STABLE_APPSTREAM +-#include +-#include +-#include +-#include +-#else + #include +-#include + #include + #include +-#endif +- + #include + #include + #include +@@ -319,26 +309,12 @@ void PackageKitBackend::reloadPackageList() + } + acquireFetching(false); + +- const QList distroComponents = +-#if ASQ_CHECK_VERSION(1, 0, 0) +- m_appdata->componentsById(AppStream::SystemInfo::currentDistroComponentId()).toList(); +-#else +- m_appdata->componentsById(AppStream::Utils::currentDistroComponentId()); +-#endif +- ++ const QList distroComponents = m_appdata->componentsById(AppStream::Utils::currentDistroComponentId()); + if (distroComponents.isEmpty()) { +-#if ASQ_CHECK_VERSION(1, 0, 0) +- qWarning() << "no component found for" << AppStream::SystemInfo::currentDistroComponentId(); +-#else + qWarning() << "no component found for" << AppStream::Utils::currentDistroComponentId(); +-#endif + } + for (const AppStream::Component &dc : distroComponents) { +-#if ASQ_CHECK_VERSION(1, 0, 0) +- const auto releases = dc.releasesPlain().entries(); +-#else + const auto releases = dc.releases(); +-#endif + for (const auto &r : releases) { + int cmp = AppStream::Utils::vercmpSimple(r.version(), AppStreamIntegration::global()->osRelease()->versionId()); + if (cmp == 0) { +@@ -576,11 +552,7 @@ QList PackageKitBackend::componentsById(const QString &id) + if (comps.isEmpty()) { + comps = m_appdata->componentsByProvided(AppStream::Provided::KindId, id); + } +-#if ASQ_CHECK_VERSION(1, 0, 0) +- return comps.toList(); +-#else + return comps; +-#endif + } + + static const auto needsResolveFilter = [](AbstractResource *res) { +@@ -726,25 +698,13 @@ ResultsStream *PackageKitBackend::search(const AbstractResourcesBackend::Filters + if (!stream) { + return; + } +- QList components; +- if (!filter.search.isEmpty()) { +-#if ASQ_CHECK_VERSION(1, 0, 0) +- components = m_appdata->search(filter.search).toList(); +-#else +- components = m_appdata->search(filter.search); +-#endif ++ const auto components = !filter.search.isEmpty() ? m_appdata->search(filter.search) + #if ASQ_CHECK_VERSION(0, 15, 6) +- } else if (filter.category) { +- components = AppStreamUtils::componentsByCategories(m_appdata.get(), filter.category, AppStream::Bundle::KindUnknown); +-#endif +- } else { +-#if ASQ_CHECK_VERSION(1, 0, 0) +- components = m_appdata->components().toList(); +-#else +- components = m_appdata->components(); ++ : filter.category ? AppStreamUtils::componentsByCategories(m_appdata.get(), ++ filter.category, ++ AppStream::Bundle::KindUnknown) + #endif +- } +- ++ : m_appdata->components(); + const QSet ids = kTransform>(components, [](const AppStream::Component &comp) { + return comp.id(); + }); +diff --git a/libdiscover/backends/PackageKitBackend/PackageKitBackend.h b/libdiscover/backends/PackageKitBackend/PackageKitBackend.h +index c632fe8d9..d9a5fd824 100644 +--- a/libdiscover/backends/PackageKitBackend/PackageKitBackend.h ++++ b/libdiscover/backends/PackageKitBackend/PackageKitBackend.h +@@ -7,13 +7,7 @@ + #pragma once + + #include "PackageKitResource.h" +- +-#ifdef DISCOVER_USE_STABLE_APPSTREAM +-#include +-#else + #include +-#endif +- + #include + #include + #include +diff --git a/libdiscover/backends/PackageKitBackend/PackageKitResource.cpp b/libdiscover/backends/PackageKitBackend/PackageKitResource.cpp +index 3f6464d38..8bdaec395 100644 +--- a/libdiscover/backends/PackageKitBackend/PackageKitResource.cpp ++++ b/libdiscover/backends/PackageKitBackend/PackageKitResource.cpp +@@ -10,13 +10,7 @@ + #include "PackageKitMessages.h" + #include "appstream/AppStreamUtils.h" + #include "config-paths.h" +- +-#ifdef DISCOVER_USE_STABLE_APPSTREAM +-#include +-#else + #include +-#endif +- + #include + #include + #include +diff --git a/libdiscover/backends/RpmOstreeBackend/RpmOstreeBackend.cpp b/libdiscover/backends/RpmOstreeBackend/RpmOstreeBackend.cpp +index 033008eb3..6e1528be4 100644 +--- a/libdiscover/backends/RpmOstreeBackend/RpmOstreeBackend.cpp ++++ b/libdiscover/backends/RpmOstreeBackend/RpmOstreeBackend.cpp +@@ -10,16 +10,8 @@ + + #include "Transaction/TransactionModel.h" + +-#ifdef DISCOVER_USE_STABLE_APPSTREAM +-#include +-#include +-#include +-#else + #include + #include +-#include +-#endif +- + #include + #include + #include +@@ -324,12 +316,7 @@ void RpmOstreeBackend::lookForNextMajorVersion() + } + + // Look at releases to see if we have a new major version available. +-#if ASQ_CHECK_VERSION(1, 0, 0) +- const auto distroComponents = m_appdata->componentsById(distroId).toList(); +-#else +- const auto distroComponents = m_appdata->componentsById(distroId); +-#endif +- ++ const QList distroComponents = m_appdata->componentsById(distroId); + if (distroComponents.isEmpty()) { + qWarning() << "rpm-ostree-backend: No component found for" << distroId; + return; +@@ -337,13 +324,8 @@ void RpmOstreeBackend::lookForNextMajorVersion() + + QString currentVersion = AppStreamIntegration::global()->osRelease()->versionId(); + QString nextVersion; +- + for (const AppStream::Component &dc : distroComponents) { +-#if ASQ_CHECK_VERSION(1, 0, 0) +- const auto releases = dc.releasesPlain().entries(); +-#else + const auto releases = dc.releases(); +-#endif + for (const auto &r : releases) { + // Only look at stable releases unless development mode is enabled + if ((r.kind() != AppStream::Release::KindStable) && !m_developmentEnabled) { +diff --git a/libdiscover/backends/RpmOstreeBackend/RpmOstreeBackend.h b/libdiscover/backends/RpmOstreeBackend/RpmOstreeBackend.h +index 7ce272dd2..8ceed1af1 100644 +--- a/libdiscover/backends/RpmOstreeBackend/RpmOstreeBackend.h ++++ b/libdiscover/backends/RpmOstreeBackend/RpmOstreeBackend.h +@@ -14,12 +14,7 @@ + #include + #include + +-#ifdef DISCOVER_USE_STABLE_APPSTREAM +-#include +-#else + #include +-#endif +- + #include + + class DiscoverAction; diff -Nru plasma-discover-5.27.11/debian/patches/series plasma-discover-5.27.11/debian/patches/series --- plasma-discover-5.27.11/debian/patches/series 1970-01-01 00:00:00.000000000 +0000 +++ plasma-discover-5.27.11/debian/patches/series 2024-03-17 07:20:26.000000000 +0000 @@ -0,0 +1 @@ +revert_2b7c8508b.patch