[vlc-commits] [Git][videolan/vlc][master] qml: Fix warnings

Jean-Baptiste Kempf gitlab at videolan.org
Thu Jun 10 12:17:14 UTC 2021



Jean-Baptiste Kempf pushed to branch master at VideoLAN / VLC


Commits:
53e49053 by Benjamin Arnaud at 2021-06-10T11:32:53+00:00
qml: Fix warnings

- - - - -


5 changed files:

- modules/gui/qt/medialibrary/qml/MediaGroupList.qml
- modules/gui/qt/medialibrary/qml/PlaylistMediaList.qml
- modules/gui/qt/medialibrary/qml/VideoAll.qml
- modules/gui/qt/medialibrary/qml/VideoAllDisplay.qml
- modules/gui/qt/widgets/qml/ExpandGridView.qml


Changes:

=====================================
modules/gui/qt/medialibrary/qml/MediaGroupList.qml
=====================================
@@ -18,7 +18,8 @@
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
  *****************************************************************************/
 
-import QtQuick 2.11
+import QtQuick      2.11
+import QtQml.Models 2.11
 
 import org.videolan.medialib 0.1
 
@@ -336,7 +337,8 @@ Widgets.NavigableFocusScope {
             Connections {
                 target: contextMenu
 
-                onShowMediaInformation: gridView.switchExpandItem(index)
+                // FIXME: We need to implement this in qml_menu_wrapper.
+                //onShowMediaInformation: gridView.switchExpandItem(index)
             }
 
             //-------------------------------------------------------------------------------------
@@ -369,8 +371,6 @@ Widgets.NavigableFocusScope {
 
             dragItem: dragItemGroup
 
-            header: root.header
-
             headerTopPadding: VLCStyle.margin_normal
 
             headerPositioning: ListView.InlineHeader


=====================================
modules/gui/qt/medialibrary/qml/PlaylistMediaList.qml
=====================================
@@ -52,11 +52,6 @@ Widgets.NavigableFocusScope {
     property int _height: (isMusic) ? VLCStyle.gridItem_music_height
                                     : VLCStyle.gridItem_video_height
 
-    property int _widthColumn:
-        Math.max(VLCStyle.gridColumnsForWidth(tableView.availableRowWidth
-                                              - VLCStyle.listAlbumCover_width
-                                              - VLCStyle.column_margin_width) - 1, 1)
-
     property int _widthCover: (isMusic) ? VLCStyle.gridCover_music_width
                                         : VLCStyle.gridCover_video_width
 


=====================================
modules/gui/qt/medialibrary/qml/VideoAll.qml
=====================================
@@ -100,7 +100,7 @@ Widgets.NavigableFocusScope {
         target: model
 
         onCountChanged: {
-            if (count === 0 || modelSelect.hasSelection) return;
+            if (model.count === 0 || modelSelect.hasSelection) return;
 
             resetFocus();
         }


=====================================
modules/gui/qt/medialibrary/qml/VideoAllDisplay.qml
=====================================
@@ -50,7 +50,7 @@ VideoAll {
     }
 
     header: Column {
-        property Item focusItem: loader.item.focusItem
+        property Item focusItem: (loader.status === Loader.Ready) ? loader.item.focusItem : null
 
         width: root.width
 
@@ -63,7 +63,7 @@ VideoAll {
 
             width: parent.width
 
-            height: item.implicitHeight
+            height: (status === Loader.Ready) ? item.implicitHeight : 0
 
             active: (modelRecent.count)
 


=====================================
modules/gui/qt/widgets/qml/ExpandGridView.qml
=====================================
@@ -417,8 +417,7 @@ NavigableFocusScope {
 
         Loader {
             id: footerItemLoader
-
-            focus: status == Loader.Ready ? item.focus : false
+            focus: (status === Loader.Ready) ? item.focus : false
             y: root.topMargin + root.headerHeight + (root._effectiveCellHeight * (Math.ceil(model.count / getNbItemsPerRow()))) +
                _expandItemVerticalSpace
         }



View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/53e49053c5fe0fbb1864873adc8aa903a2cc2315

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/53e49053c5fe0fbb1864873adc8aa903a2cc2315
You're receiving this email because of your account on code.videolan.org.




More information about the vlc-commits mailing list