Felix Paul Kühne pushed to branch master at VideoLAN / VLC


Commits:
3606e0c5 by Prince Gupta at 2024-06-01T16:28:26+00:00
qml: only signal itemClicked on pressing left button in GridItem

- - - - -
2d905951 by Prince Gupta at 2024-06-01T16:28:26+00:00
qml: remove unused params from signal itemClicked of GridItem

- - - - -
8fffc6e2 by Prince Gupta at 2024-06-01T16:28:26+00:00
qml: remove unused params from itemDoubleClicked signal of GridItem

- - - - -


10 changed files:

- modules/gui/qt/medialibrary/qml/MusicAlbums.qml
- modules/gui/qt/medialibrary/qml/MusicAllArtists.qml
- modules/gui/qt/medialibrary/qml/MusicArtist.qml
- modules/gui/qt/medialibrary/qml/MusicGenres.qml
- modules/gui/qt/medialibrary/qml/PlaylistMediaList.qml
- modules/gui/qt/medialibrary/qml/VideoGridDisplay.qml
- modules/gui/qt/network/qml/BrowseDeviceView.qml
- modules/gui/qt/network/qml/BrowseTreeDisplay.qml
- modules/gui/qt/network/qml/ServicesSources.qml
- modules/gui/qt/widgets/qml/GridItem.qml


Changes:

=====================================
modules/gui/qt/medialibrary/qml/MusicAlbums.qml
=====================================
@@ -110,9 +110,9 @@ MainInterface.MainViewLoader {
 
                 opacity: gridView_id.expandIndex !== -1 && 
gridView_id.expandIndex !== audioGridItem.index ? .7 : 1
                 dragItem: albumDragItem
-                onItemClicked : (_,_,modifier) => { 
gridView_id.leftClickOnItem(modifier, index) }
+                onItemClicked : (modifier) => { 
gridView_id.leftClickOnItem(modifier, index) }
 
-                onItemDoubleClicked: (_,_,modifier) => {
+                onItemDoubleClicked: {
                     gridView_id.switchExpandItem(index)
                 }
 


=====================================
modules/gui/qt/medialibrary/qml/MusicAllArtists.qml
=====================================
@@ -120,9 +120,9 @@ MainInterface.MainViewLoader {
                 width: VLCStyle.colWidth(1)
                 dragItem: artistsDragItem
 
-                onItemClicked: (_,_, modifier) => { 
artistGrid.leftClickOnItem(modifier, index) }
+                onItemClicked: (modifier) => { 
artistGrid.leftClickOnItem(modifier, index) }
 
-                onItemDoubleClicked: (_,_, modifier) => { 
root.requestArtistAlbumView(Qt.MouseFocusReason) }
+                onItemDoubleClicked: 
root.requestArtistAlbumView(Qt.MouseFocusReason)
 
                 onContextMenuButtonClicked: (_, globalMousePos) => {
                     artistGrid.rightClickOnItem(index)


=====================================
modules/gui/qt/medialibrary/qml/MusicArtist.qml
=====================================
@@ -189,7 +189,7 @@ FocusScope {
                             onPlayClicked: play()
                             onItemDoubleClicked: play()
 
-                            onItemClicked: (_,_, modifier) => {
+                            onItemClicked: (modifier) => {
                                 albumsList.selectionModel.updateSelection( 
modifier , albumsList.currentIndex, index )
                                 albumsList.currentIndex = index
                                 albumsList.forceActiveFocus()
@@ -355,7 +355,7 @@ FocusScope {
                 opacity: gridView_id.expandIndex !== -1 && 
gridView_id.expandIndex !== audioGridItem.index ? .7 : 1
                 dragItem: albumDragItem
 
-                onItemClicked : (_,_,modifier) => {
+                onItemClicked : (modifier) => {
                     gridView_id.leftClickOnItem(modifier, index)
                 }
 


=====================================
modules/gui/qt/medialibrary/qml/MusicGenres.qml
=====================================
@@ -36,7 +36,7 @@ MainInterface.MainViewLoader {
     readonly property var currentIndex: currentItem?.currentIndex ?? - 1
 
     property Component header: null
-    
+
     readonly property int contentLeftMargin: currentItem?.contentLeftMargin ?? 0
     readonly property int contentRightMargin: currentItem?.contentRightMargin 
?? 0
 
@@ -145,8 +145,8 @@ MainInterface.MainViewLoader {
                 playCoverBorderWidth: VLCStyle.dp(3, VLCStyle.scale)
                 dragItem: genreDragItem
 
-                onItemDoubleClicked: (_,_,modifier) => { 
root.showAlbumView(model.id, model.name, Qt.MouseFocusReason) }
-                onItemClicked: (_,_,modifier) => { 
gridView_id.leftClickOnItem(modifier, genreGridDelegate.index) }
+                onItemDoubleClicked: root.showAlbumView(model.id, model.name, 
Qt.MouseFocusReason)
+                onItemClicked: (modifier) => { 
gridView_id.leftClickOnItem(modifier, item.index) }
 
                 onPlayClicked: {
                     if (model.id)


=====================================
modules/gui/qt/medialibrary/qml/PlaylistMediaList.qml
=====================================
@@ -295,9 +295,9 @@ MainInterface.MainViewLoader {
                 
//---------------------------------------------------------------------------------
                 // Events
 
-                onItemClicked: (_,_,modifier) => { 
gridView.leftClickOnItem(modifier, index) }
+                onItemClicked: (modifier) => { 
gridView.leftClickOnItem(modifier, index) }
 
-                onItemDoubleClicked: (_,_,modifier) => { showList(model, 
Qt.MouseFocusReason) }
+                onItemDoubleClicked: showList(model, Qt.MouseFocusReason)
 
                 onPlayClicked: if (model.id) MediaLib.addAndPlay(model.id)
 


=====================================
modules/gui/qt/medialibrary/qml/VideoGridDisplay.qml
=====================================
@@ -106,7 +106,7 @@ MainInterface.MainGridView {
 
         // Events
 
-        onItemClicked: (_,_, modifier) => { gridView.leftClickOnItem(modifier, 
index) }
+        onItemClicked: (modifier) => { gridView.leftClickOnItem(modifier, 
index) }
 
         onItemDoubleClicked: model => gridView.itemDoubleClicked(model)
 


=====================================
modules/gui/qt/network/qml/BrowseDeviceView.qml
=====================================
@@ -207,9 +207,9 @@ FocusScope {
             onActionAtIndex: (index) => { root.onAction(index) }
 
             delegate: NetworkGridItem {
-                onItemClicked: (_, _, modifier) => { root.onClicked(model, 
index, modifier) }
+                onItemClicked: (modifier) => { root.onClicked(model, index, 
modifier) }
 
-                onItemDoubleClicked: (_, _, modifier) => { 
root.onDoubleClicked(model, index) }
+                onItemDoubleClicked: root.onDoubleClicked(model, index)
 
                 onPlayClicked: root.playAt(index)
             }


=====================================
modules/gui/qt/network/qml/BrowseTreeDisplay.qml
=====================================
@@ -168,11 +168,11 @@ MainInterface.MainViewLoader {
                 dragItem: networkDragItem
 
                 onPlayClicked: playAt(index)
-                onItemClicked : (_, _, modifier) => {
+                onItemClicked : (modifier) => {
                     gridView.leftClickOnItem(modifier, index)
                 }
 
-                onItemDoubleClicked: (_, _, modifier) => {
+                onItemDoubleClicked: {
                     if (model.type === NetworkMediaModel.TYPE_NODE || 
model.type === NetworkMediaModel.TYPE_DIRECTORY)
                         browse(model.tree, Qt.MouseFocusReason)
                     else


=====================================
modules/gui/qt/network/qml/ServicesSources.qml
=====================================
@@ -95,14 +95,14 @@ MainInterface.MainGridView {
                 .uri()
         }
 
-        onItemDoubleClicked: (_, _, modifier) => {
+        onItemDoubleClicked: {
             if (is_dummy)
                 root.browseServiceManage(Qt.MouseFocusReason)
             else
                 root.browseSourceRoot(model.name, Qt.TabFocusReason)
         }
 
-        onItemClicked : (_, _, modifier) => {
+        onItemClicked : (modifier) => {
             root.selectionModel.updateSelection(modifier, root.currentIndex, 
index)
             root.currentIndex = index
             root.forceActiveFocus()


=====================================
modules/gui/qt/widgets/qml/GridItem.qml
=====================================
@@ -69,8 +69,8 @@ T.ItemDelegate {
 
     signal playClicked
     signal addToPlaylistClicked
-    signal itemClicked(Item menuParent, int key, int modifier)
-    signal itemDoubleClicked(Item menuParent, int keys, int modifier)
+    signal itemClicked(int modifier)
+    signal itemDoubleClicked(int modifier)
     signal contextMenuButtonClicked(Item menuParent, point globalMousePos)
 
     // Settings
@@ -191,14 +191,14 @@ T.ItemDelegate {
         onClicked: (mouse) => {
             if (mouse.button === Qt.RightButton)
                 contextMenuButtonClicked(picture, 
root.mapToGlobal(mouse.x,mouse.y));
-            else {
-                root.itemClicked(picture, mouse.button, mouse.modifiers);
+            else if (mouse.button === Qt.LeftButton) {
+                root.itemClicked(mouse.modifiers);
             }
         }
 
         onDoubleClicked: (mouse) => {
             if (mouse.button === Qt.LeftButton)
-                root.itemDoubleClicked(picture,mouse.buttons, mouse.modifiers)
+                root.itemDoubleClicked(mouse.modifiers)
         }
 
         onPressed: (mouse) => {
@@ -209,7 +209,7 @@ T.ItemDelegate {
             // perform the "click" action because the click action is only 
executed on mouse release (we are in the pressed state)
             // but we will need the updated list on drop
             if (drag.active && !selected) {
-                root.itemClicked(picture, Qt.LeftButton, 
root._modifiersOnLastPress)
+                root.itemClicked(root._modifiersOnLastPress)
             } else if (root.dragItem) {
                 root.dragItem.Drag.drop()
             }
@@ -220,8 +220,8 @@ T.ItemDelegate {
             acceptedDevices: PointerDevice.TouchScreen
 
             onTapped: (eventPoint, button) => {
-                root.itemClicked(picture, Qt.LeftButton, Qt.NoModifier)
-                root.itemDoubleClicked(picture, Qt.LeftButton, Qt.NoModifier)
+                root.itemClicked(Qt.NoModifier)
+                root.itemDoubleClicked(Qt.NoModifier)
             }
 
             onLongPressed: {
@@ -255,7 +255,7 @@ T.ItemDelegate {
                 onPlayIconClicked: (mouse) => {
                     // emulate a mouse click before delivering the play signal 
as to select the item
                     // this helps in updating the selection and restore of 
initial index in the parent views
-                    root.itemClicked(picture, mouse.button, mouse.modifiers)
+                    root.itemClicked(mouse.modifiers)
                     root.playClicked()
                 }
 



View it on GitLab: 
https://code.videolan.org/videolan/vlc/-/compare/5afeb5aaefe806c6948ab767563d17077ee64295...8fffc6e248d88104f338d26c64ef3a3c0c5e82bc

-- 
This project does not include diff previews in email notifications.
View it on GitLab: 
https://code.videolan.org/videolan/vlc/-/compare/5afeb5aaefe806c6948ab767563d17077ee64295...8fffc6e248d88104f338d26c64ef3a3c0c5e82bc
You're receiving this email because of your account on code.videolan.org.


VideoLAN code repository instance
_______________________________________________
vlc-commits mailing list
vlc-commits@videolan.org
https://mailman.videolan.org/listinfo/vlc-commits

Reply via email to