Commit 8386a233 authored by Aleix Pol Gonzalez's avatar Aleix Pol Gonzalez 🐧

Fix build with older versions of libsnap-glib

parent cb407b80
......@@ -6,6 +6,9 @@ target_link_libraries(snap-backend Qt5::Core KF5::CoreAddons KF5::ConfigCore Dis
if ("${Snapd_VERSION}" VERSION_GREATER 1.40)
target_compile_definitions(snap-backend PRIVATE -DSNAP_COMMON_IDS -DSNAP_CHANNELS)
endif()
if ("${Snapd_VERSION}" VERSION_GREATER 1.42)
target_compile_definitions(snap-backend PRIVATE -DSNAP_PUBLISHER)
endif()
install(TARGETS snap-backend DESTINATION ${PLUGIN_INSTALL_DIR}/discover)
install(FILES snap-backend-categories.xml DESTINATION ${DATA_INSTALL_DIR}/libdiscover/categories)
......
......@@ -358,10 +358,14 @@ QString SnapResource::channel() const
QString SnapResource::author() const
{
#ifdef SNAP_PUBLISHER
QString author = m_snap->publisherDisplayName();
if (m_snap->publisherValidation() == QSnapdEnums::PublisherValidationVerified) {
author += QStringLiteral(" ✅");
}
#else
QString author;
#endif
return author;
}
......
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