From 1217913bc0276ad5a0bf02b8ab93744c373fc4f4 Mon Sep 17 00:00:00 2001 From: Matthias Klumpp Date: Wed, 20 Dec 2023 06:47:42 +0100 Subject: [PATCH] qt: Add missing screenshot sorting function --- qt/component.cpp | 10 ++++++++++ qt/component.h | 1 + 2 files changed, 11 insertions(+) diff --git a/qt/component.cpp b/qt/component.cpp index fba82b587..60c733e82 100644 --- a/qt/component.cpp +++ b/qt/component.cpp @@ -550,6 +550,16 @@ void AppStream::Component::addProvided(const AppStream::Provided &provided) as_component_add_provided(d->cpt, provided.cPtr()); } +void Component::sortScreenshots(const QString &environment, + const QString &style, + bool prioritizeStyle) +{ + as_component_sort_screenshots(d->cpt, + qPrintable(environment), + qPrintable(style), + prioritizeStyle); +} + QList Component::screenshotsAll() const { QList res; diff --git a/qt/component.h b/qt/component.h index f985285b7..43c5f1f29 100644 --- a/qt/component.h +++ b/qt/component.h @@ -225,6 +225,7 @@ class APPSTREAMQT_EXPORT Component AppStream::Provided provided(Provided::Kind kind) const; void addProvided(const AppStream::Provided &provided); + void sortScreenshots(const QString &environment, const QString &style, bool prioritizeStyle); QList screenshotsAll() const; void addScreenshot(const AppStream::Screenshot &screenshot);