[vlc-devel] [PATCH 04/14] qml: rename root item global reference

Pierre Lamot pierre at videolabs.io
Thu Oct 22 15:14:16 CEST 2020


---
 modules/gui/qt/maininterface/qml/MainInterface.qml | 2 +-
 modules/gui/qt/player/qml/ControlBar.qml           | 4 ++--
 modules/gui/qt/player/qml/MiniPlayer.qml           | 2 +-
 modules/gui/qt/widgets/qml/SortControl.qml         | 6 +++---
 4 files changed, 7 insertions(+), 7 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/player/qml/ControlBar.qml b/modules/gui/qt/player/qml/ControlBar.qml
index f085b7075d..857381e01e 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: buttons.focus = true
 
-            parentWindow: mainInterfaceRect
+            parentWindow: g_root
         }
 
 
@@ -129,7 +129,7 @@ Widgets.NavigableFocusScope {
     ControlButtons{
         id:controlmodelbuttons
 
-        parentWindow: mainInterfaceRect
+        parentWindow: g_root
     }
 
 }
diff --git a/modules/gui/qt/player/qml/MiniPlayer.qml b/modules/gui/qt/player/qml/MiniPlayer.qml
index 368c98c0ef..57e8ad1467 100644
--- a/modules/gui/qt/player/qml/MiniPlayer.qml
+++ b/modules/gui/qt/player/qml/MiniPlayer.qml
@@ -238,7 +238,7 @@ Widgets.NavigableFocusScope {
                 id: controlmodelbuttons
 
                 isMiniplayer: true
-                parentWindow: mainInterfaceRect
+                parentWindow: g_root
             }
 
             Keys.onPressed: {
diff --git a/modules/gui/qt/widgets/qml/SortControl.qml b/modules/gui/qt/widgets/qml/SortControl.qml
index 1b7e677e96..6f22fe3a1d 100644
--- a/modules/gui/qt/widgets/qml/SortControl.qml
+++ b/modules/gui/qt/widgets/qml/SortControl.qml
@@ -208,7 +208,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 {
@@ -217,7 +217,7 @@ Widgets.NavigableFocusScope {
 
             Widgets.FrostedGlassEffect {
                 id: glassEffect
-                source: mainInterfaceRect
+                source: g_root
 
                 anchors.fill: parent
                 anchors.margins: VLCStyle.dp(1)
@@ -231,7 +231,7 @@ Widgets.NavigableFocusScope {
         }
 
         Connections {
-            target: mainInterfaceRect
+            target: g_root
 
             enabled: popup.visible
 
-- 
2.25.1



More information about the vlc-devel mailing list