[vlc-commits] qml: rename root item global reference

Pierre Lamot git at videolan.org
Mon Dec 7 12:31:49 UTC 2020


vlc | branch: master | Pierre Lamot <pierre at videolabs.io> | Fri Oct 16 10:05:57 2020 +0200| [0472e3a139fcfa7ec5de1bf0ba2afa916298615f] | committer: Pierre Lamot

qml: rename root item global reference

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=0472e3a139fcfa7ec5de1bf0ba2afa916298615f
---

 modules/gui/qt/maininterface/qml/MainInterface.qml | 2 +-
 modules/gui/qt/network/qml/NetworkAddressbar.qml   | 6 ++----
 modules/gui/qt/player/qml/ControlBar.qml           | 2 +-
 modules/gui/qt/player/qml/PlayerButtonsLayout.qml  | 2 +-
 modules/gui/qt/widgets/qml/SortControl.qml         | 6 +++---
 5 files changed, 8 insertions(+), 10 deletions(-)

diff --git a/modules/gui/qt/maininterface/qml/MainInterface.qml b/modules/gui/qt/maininterface/qml/MainInterface.qml
index ba8adf52a0..69c54aa305 100644
--- a/modules/gui/qt/maininterface/qml/MainInterface.qml
+++ b/modules/gui/qt/maininterface/qml/MainInterface.qml
@@ -33,7 +33,7 @@ Rectangle {
     property bool _interfaceReady: false
     property bool _playlistReady: false
 
-    property alias mainInterfaceRect: root
+    property alias g_root: root
     property variant g_dialogs: dialogsLoader.item
 
     Binding {
diff --git a/modules/gui/qt/network/qml/NetworkAddressbar.qml b/modules/gui/qt/network/qml/NetworkAddressbar.qml
index 33de4e8f17..aa2493980a 100644
--- a/modules/gui/qt/network/qml/NetworkAddressbar.qml
+++ b/modules/gui/qt/network/qml/NetworkAddressbar.qml
@@ -247,9 +247,7 @@ Control {
         }
 
         function updateBgRect() {
-            glassEffect.popupGlobalPos = mainInterfaceRect.mapFromItem(control,
-                                                                       popup.x,
-                                                                       popup.y)
+            glassEffect.popupGlobalPos = g_root.mapFromItem(control, popup.x, popup.y)
         }
 
         background: Rectangle {
@@ -258,7 +256,7 @@ Control {
 
             Widgets.FrostedGlassEffect {
                 id: glassEffect
-                source: mainInterfaceRect
+                source: g_root
 
                 anchors.fill: parent
                 anchors.margins: VLCStyle.dp(1)
diff --git a/modules/gui/qt/player/qml/ControlBar.qml b/modules/gui/qt/player/qml/ControlBar.qml
index 47506f5afc..df1bda49d5 100644
--- a/modules/gui/qt/player/qml/ControlBar.qml
+++ b/modules/gui/qt/player/qml/ControlBar.qml
@@ -86,7 +86,7 @@ Widgets.NavigableFocusScope {
             enabled: player.playingState == PlayerController.PLAYING_STATE_PLAYING || player.playingState == PlayerController.PLAYING_STATE_PAUSED
             Keys.onDownPressed: playerButtonsLayout.focus = true
 
-            parentWindow: mainInterfaceRect
+            parentWindow: g_root
         }
 
         Item {
diff --git a/modules/gui/qt/player/qml/PlayerButtonsLayout.qml b/modules/gui/qt/player/qml/PlayerButtonsLayout.qml
index 6cfa1730fd..872583609a 100644
--- a/modules/gui/qt/player/qml/PlayerButtonsLayout.qml
+++ b/modules/gui/qt/player/qml/PlayerButtonsLayout.qml
@@ -65,7 +65,7 @@ Widgets.NavigableFocusScope {
         id: controlmodelbuttons
 
         isMiniplayer: false
-        parentWindow: mainInterfaceRect
+        parentWindow: g_root
     }
 
     ButtonsLayout {
diff --git a/modules/gui/qt/widgets/qml/SortControl.qml b/modules/gui/qt/widgets/qml/SortControl.qml
index c84cbf1bf4..7eeb9dc63e 100644
--- a/modules/gui/qt/widgets/qml/SortControl.qml
+++ b/modules/gui/qt/widgets/qml/SortControl.qml
@@ -229,7 +229,7 @@ Widgets.NavigableFocusScope {
         }
 
         function updateBgRect() {
-            glassEffect.popupGlobalPos = mainInterfaceRect.mapFromItem(root, popup.x, popup.y)
+            glassEffect.popupGlobalPos = g_root.mapFromItem(root, popup.x, popup.y)
         }
 
         background: Rectangle {
@@ -238,7 +238,7 @@ Widgets.NavigableFocusScope {
 
             Widgets.FrostedGlassEffect {
                 id: glassEffect
-                source: mainInterfaceRect
+                source: g_root
 
                 anchors.fill: parent
                 anchors.margins: VLCStyle.dp(1)
@@ -252,7 +252,7 @@ Widgets.NavigableFocusScope {
         }
 
         Connections {
-            target: mainInterfaceRect
+            target: g_root
 
             enabled: popup.visible
 



More information about the vlc-commits mailing list