[vlc-commits] [Git][videolan/vlc][master] 2 commits: qt: removed unused roles from mlvideofoldersmodel
Hugo Beauzée-Luyssen (@chouquette)
gitlab at videolan.org
Thu Jun 16 14:34:37 UTC 2022
Hugo Beauzée-Luyssen pushed to branch master at VideoLAN / VLC
Commits:
9841f8a3 by Prince Gupta at 2022-06-16T13:27:00+00:00
qt: removed unused roles from mlvideofoldersmodel
- - - - -
0d8012dd by Prince Gupta at 2022-06-16T13:27:00+00:00
qml: don't show info expand panel for folder in video view
- - - - -
4 changed files:
- modules/gui/qt/medialibrary/mlvideofoldersmodel.cpp
- modules/gui/qt/medialibrary/mlvideofoldersmodel.hpp
- modules/gui/qt/medialibrary/qml/VideoAll.qml
- modules/gui/qt/medialibrary/qml/VideoAllSubDisplay.qml
Changes:
=====================================
modules/gui/qt/medialibrary/mlvideofoldersmodel.cpp
=====================================
@@ -56,11 +56,9 @@ QHash<int, QByteArray> MLVideoFoldersModel::roleNames() const /* override */
{
return {
{ FOLDER_ID, "id" },
- { FOLDER_IS_NEW, "isNew" },
{ FOLDER_TITLE, "title" },
{ FOLDER_THUMBNAIL, "thumbnail" },
{ FOLDER_DURATION, "duration" },
- { FOLDER_PROGRESS, "progress" },
{ FOLDER_COUNT, "count"},
};
}
=====================================
modules/gui/qt/medialibrary/mlvideofoldersmodel.hpp
=====================================
@@ -35,11 +35,9 @@ public:
enum Roles
{
FOLDER_ID = Qt::UserRole + 1,
- FOLDER_IS_NEW,
FOLDER_TITLE,
FOLDER_THUMBNAIL,
FOLDER_DURATION,
- FOLDER_PROGRESS,
FOLDER_COUNT
};
=====================================
modules/gui/qt/medialibrary/qml/VideoAll.qml
=====================================
@@ -284,7 +284,7 @@ FocusScope {
gridView.rightClickOnItem(index);
var options = {}
- if (Helpers.get(model, "isVideo", true))
+ if (root.isInfoExpandPanelAvailable(model))
options["information"] = index
root.contextMenu.popup(modelSelect.selectedIndexes, globalMousePos, options);
=====================================
modules/gui/qt/medialibrary/qml/VideoAllSubDisplay.qml
=====================================
@@ -103,6 +103,10 @@ VideoAll {
function onLabelGrid(object) { return _meta.onLabelGrid(object) }
function onLabelList(object) { return _meta.onLabelList(object) }
+ function isInfoExpandPanelAvailable(modelIndexData) {
+ return _meta.isInfoExpandPanelAvailable(modelIndexData)
+ }
+
// Children
Connections {
@@ -130,6 +134,8 @@ VideoAll {
function onLabelGrid(object) { return root.getLabel(object) }
function onLabelList(object) { return root.getLabel(object) }
+
+ function isInfoExpandPanelAvailable(modelIndexData) { return true }
}
}
@@ -174,6 +180,10 @@ VideoAll {
function onLabelList(object) {
return root.getLabelGroup(object, I18n.qtr("%1"))
}
+
+ function isInfoExpandPanelAvailable(modelIndexData) {
+ return modelIndexData.isVideo
+ }
}
}
@@ -202,6 +212,10 @@ VideoAll {
function onLabelList(object) {
return root.getLabelGroup(object, I18n.qtr("%1"))
}
+
+ function isInfoExpandPanelAvailable(modelIndexData) {
+ return false
+ }
}
}
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/95f211fd2f72fc7526defc8820b746af86f97bb2...0d8012dd0c4498cc2d39abcded8c67491f704755
--
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/95f211fd2f72fc7526defc8820b746af86f97bb2...0d8012dd0c4498cc2d39abcded8c67491f704755
You're receiving this email because of your account on code.videolan.org.
VideoLAN code repository instance
More information about the vlc-commits
mailing list