[vlc-commits] qml: integrate new SortControl to BannerSources
Fatih Uzunoglu
git at videolan.org
Thu Oct 15 10:32:45 CEST 2020
vlc | branch: master | Fatih Uzunoglu <fuzun54 at outlook.com> | Fri Oct 9 19:56:35 2020 +0300| [ca37169e66d1e3ff16522bcf64a904a443ee2cb2] | committer: Pierre Lamot
qml: integrate new SortControl to BannerSources
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=ca37169e66d1e3ff16522bcf64a904a443ee2cb2
---
modules/gui/qt/maininterface/qml/BannerSources.qml | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a/modules/gui/qt/maininterface/qml/BannerSources.qml b/modules/gui/qt/maininterface/qml/BannerSources.qml
index 0f73fa6912..9a7c91d69c 100644
--- a/modules/gui/qt/maininterface/qml/BannerSources.qml
+++ b/modules/gui/qt/maininterface/qml/BannerSources.qml
@@ -236,6 +236,7 @@ Widgets.NavigableFocusScope {
id: sortControl
textRole: "text"
+ criteriaRole: "criteria"
listWidth: VLCStyle.widthSortBox
height: localToolbar.height
@@ -246,9 +247,18 @@ Widgets.NavigableFocusScope {
onSortSelected: {
if (contentModel !== undefined) {
- contentModel.sortCriteria = modelData.criteria
+ contentModel.sortCriteria = modelData[criteriaRole]
}
}
+
+ onSortOrderSelected: {
+ if (contentModel !== undefined) {
+ contentModel.sortOrder = order
+ }
+ }
+
+ sortKey: contentModel.sortCriteria
+ sortOrder: contentModel.sortOrder
}
}
More information about the vlc-commits
mailing list