Skip to content

Commit

Permalink
qt: Add missing screenshot sorting function
Browse files Browse the repository at this point in the history
  • Loading branch information
ximion committed Dec 20, 2023
1 parent 1b2a2a7 commit 1217913
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
10 changes: 10 additions & 0 deletions qt/component.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<Screenshot> Component::screenshotsAll() const
{
QList<Screenshot> res;
Expand Down
1 change: 1 addition & 0 deletions qt/component.h
Original file line number Diff line number Diff line change
Expand Up @@ -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<AppStream::Screenshot> screenshotsAll() const;
void addScreenshot(const AppStream::Screenshot &screenshot);

Expand Down

0 comments on commit 1217913

Please sign in to comment.