[vlc-devel] [PATCH 14/27] qml: integrate new SortControl to BannerSources
Fatih Uzunoglu
fuzun54 at outlook.com
Fri Oct 9 18:56:35 CEST 2020
---
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 c8810e18c1..e66a3a62d3 100644
--- a/modules/gui/qt/maininterface/qml/BannerSources.qml
+++ b/modules/gui/qt/maininterface/qml/BannerSources.qml
@@ -214,6 +214,7 @@ Widgets.NavigableFocusScope {
id: sortControl
textRole: "text"
+ criteriaRole: "criteria"
listWidth: VLCStyle.widthSortBox
height: localToolbar.height
@@ -224,9 +225,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
}
}
--
2.25.1
More information about the vlc-devel
mailing list