[vlc-commits] [Git][videolan/vlc][master] qml: fix usages of hasContent for empty labels

Jean-Baptiste Kempf (@jbk) gitlab at videolan.org
Sat Feb 4 17:21:22 UTC 2023



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


Commits:
2d2e16f2 by Prince Gupta at 2023-02-04T17:06:41+00:00
qml: fix usages of hasContent for empty labels

fixup 8294dbc391cce10c8bb04fe3380bdb9bca556d3e
fixes #27772

- - - - -


7 changed files:

- modules/gui/qt/medialibrary/qml/MusicAlbums.qml
- modules/gui/qt/medialibrary/qml/MusicAllArtists.qml
- modules/gui/qt/medialibrary/qml/MusicArtistsAlbums.qml
- modules/gui/qt/medialibrary/qml/MusicGenres.qml
- modules/gui/qt/medialibrary/qml/MusicTracksDisplay.qml
- modules/gui/qt/medialibrary/qml/PlaylistMediaDisplay.qml
- modules/gui/qt/medialibrary/qml/VideoAll.qml


Changes:

=====================================
modules/gui/qt/medialibrary/qml/MusicAlbums.qml
=====================================
@@ -308,7 +308,7 @@ FocusScope {
 
     EmptyLabelButton {
         anchors.fill: parent
-        visible: albumModelId.hasContent && albumModelId.count === 0
+        visible: !albumModelId.hasContent
         focus: visible
         text: I18n.qtr("No albums found\nPlease try adding sources, by going to the Browse tab")
         Navigation.parentItem: root


=====================================
modules/gui/qt/medialibrary/qml/MusicAllArtists.qml
=====================================
@@ -252,7 +252,7 @@ FocusScope {
 
     EmptyLabelButton {
         anchors.fill: parent
-        visible: artistModel.hasContent && artistModel.count === 0
+        visible: !artistModel.hasContent
         focus: visible
         text: I18n.qtr("No artists found\nPlease try adding sources, by going to the Browse tab")
         Navigation.parentItem: root


=====================================
modules/gui/qt/medialibrary/qml/MusicArtistsAlbums.qml
=====================================
@@ -247,7 +247,7 @@ FocusScope {
 
     EmptyLabelButton {
         anchors.fill: parent
-        visible: artistModel.hasContent && artistModel.count === 0
+        visible: !artistModel.hasContent
         focus: visible
         text: I18n.qtr("No artists found\nPlease try adding sources, by going to the Browse tab")
         Navigation.parentItem: root


=====================================
modules/gui/qt/medialibrary/qml/MusicGenres.qml
=====================================
@@ -322,7 +322,7 @@ FocusScope {
 
     EmptyLabelButton {
         anchors.fill: parent
-        visible: genreModel.hasContent && genreModel.count === 0
+        visible: !genreModel.hasContent
         focus: visible
         text: I18n.qtr("No genres found\nPlease try adding sources, by going to the Browse tab")
         Navigation.parentItem: root


=====================================
modules/gui/qt/medialibrary/qml/MusicTracksDisplay.qml
=====================================
@@ -76,7 +76,7 @@ FocusScope {
 
     EmptyLabelButton {
         anchors.fill: parent
-        visible: tracklistdisplay_id.model.hasContent && tracklistdisplay_id.model.count === 0
+        visible: !tracklistdisplay_id.model.hasContent
         focus: visible
         text: I18n.qtr("No tracks found\nPlease try adding sources, by going to the Browse tab")
         Navigation.parentItem: root


=====================================
modules/gui/qt/medialibrary/qml/PlaylistMediaDisplay.qml
=====================================
@@ -218,7 +218,7 @@ FocusScope {
     EmptyLabelButton {
         anchors.fill: parent
 
-        visible: model.hasContent && (model.count === 0)
+        visible: !model.hasContent
 
         focus: visible
 


=====================================
modules/gui/qt/medialibrary/qml/VideoAll.qml
=====================================
@@ -375,7 +375,7 @@ FocusScope {
         coverWidth : VLCStyle.dp(182, VLCStyle.scale)
         coverHeight: VLCStyle.dp(114, VLCStyle.scale)
 
-        visible: model.hasContent && (model.count === 0)
+        visible: !model.hasContent
 
         focus: visible
 



View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/2d2e16f2e790be155f9f0b7b2043b047c5efa600

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/2d2e16f2e790be155f9f0b7b2043b047c5efa600
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