Commit 3c5a7309 authored by Aleix Pol Gonzalez's avatar Aleix Pol Gonzalez 🐧 Committed by Aleix Pol Gonzalez
Browse files

kns: join into the AppStreamUtils::license party


(cherry picked from commit 610c2152)
parent 8c616082
Pipeline #209059 canceled with stage
in 14 seconds
......@@ -8,7 +8,7 @@ function(add_unit_test name)
Qt::Test Qt::Core ${EXTRA_LIBS})
endfunction()
if(KF5Attica_FOUND AND KF5NewStuff_FOUND)
if(KF5Attica_FOUND AND KF5NewStuff_FOUND AND AppStreamQt_FOUND)
add_subdirectory(KNSBackend)
endif()
......
......@@ -5,6 +5,6 @@ add_library(kns-backend MODULE
KNSResource.cpp
KNSReviews.cpp)
target_link_libraries(kns-backend Discover::Common KF5::ConfigCore KF5::Attica KF5::NewStuffCore KF5::WidgetsAddons Qt::Xml)
target_link_libraries(kns-backend Discover::Common AppStreamQt KF5::ConfigCore KF5::Attica KF5::NewStuffCore KF5::WidgetsAddons Qt::Xml)
install(TARGETS kns-backend DESTINATION ${KDE_INSTALL_PLUGINDIR}/discover)
......@@ -13,6 +13,7 @@
#include <QRegularExpression>
#include "ReviewsBackend/Rating.h"
#include <appstream/AppStreamUtils.h>
KNSResource::KNSResource(const KNSCore::EntryInternal &entry, QStringList categories, KNSBackend *parent)
: AbstractResource(parent)
......@@ -130,7 +131,7 @@ KNSCore::EntryInternal KNSResource::entry() const
QJsonArray KNSResource::licenses()
{
return {QJsonObject{{QStringLiteral("name"), m_entry.license()}, {QStringLiteral("url"), QString()}}};
return {{AppStreamUtils::license(m_entry.license())}};
}
quint64 KNSResource::size()
......
Supports Markdown
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