Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Commit 961df98e authored by Aleix Pol Gonzalez's avatar Aleix Pol Gonzalez 🐧

Don't use ::commonIds if snap is too old

parent d7025644
......@@ -3,6 +3,10 @@ add_subdirectory(libsnapclient)
add_library(snap-backend MODULE SnapResource.cpp SnapBackend.cpp SnapReviewsBackend.cpp SnapTransaction.cpp snapui.qrc)
target_link_libraries(snap-backend Qt5::Core KF5::CoreAddons KF5::ConfigCore Discover::Common Snapd::Core)
if ("${Snapd_VERSION}" VERSION_GREATER 1.40)
target_compile_definitions(snap-backend PRIVATE -DSNAP_COMMON_IDS)
endif()
install(TARGETS snap-backend DESTINATION ${PLUGIN_INSTALL_DIR}/discover)
install(FILES snap-backend-categories.xml DESTINATION ${DATA_INSTALL_DIR}/libdiscover/categories)
install( FILES org.kde.discover.snap.appdata.xml DESTINATION ${KDE_INSTALL_METAINFODIR} )
......@@ -323,6 +323,10 @@ QAbstractItemModel* SnapResource::plugs(QObject* p)
QString SnapResource::appstreamId() const
{
const auto ids = m_snap->commonIds();
const QStringList ids
#if defined(SNAP_COMMON_IDS)
= m_snap->commonIds()
#endif
;
return ids.isEmpty() ? QLatin1String("com.snap.") + m_snap->name() : ids.first();
}
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