[vlc-devel] [PATCH 09/14] qml: move the autoloader mechanism of the Maxiplayer to the main browsing view

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


---
 modules/gui/qt/maininterface/qml/MainDisplay.qml   | 10 ++++++++++
 modules/gui/qt/maininterface/qml/MainInterface.qml | 11 -----------
 2 files changed, 10 insertions(+), 11 deletions(-)

diff --git a/modules/gui/qt/maininterface/qml/MainDisplay.qml b/modules/gui/qt/maininterface/qml/MainDisplay.qml
index db808eb2d6..bf5937d555 100644
--- a/modules/gui/qt/maininterface/qml/MainDisplay.qml
+++ b/modules/gui/qt/maininterface/qml/MainDisplay.qml
@@ -387,6 +387,16 @@ Widgets.NavigableFocusScope {
 
                 mainContent: mainColumn
             }
+
+            Connections {
+                target: player.videoTracks
+                onDataChanged: {
+                    if (player.videoTracks.rowCount() > 0
+                            && player.playingState === PlayerController.PLAYING_STATE_PLAYING) {
+                        g_mainDisplay.showPlayer()
+                    }
+                }
+            }
         }
     }
 }
diff --git a/modules/gui/qt/maininterface/qml/MainInterface.qml b/modules/gui/qt/maininterface/qml/MainInterface.qml
index 69c54aa305..d3f4016405 100644
--- a/modules/gui/qt/maininterface/qml/MainInterface.qml
+++ b/modules/gui/qt/maininterface/qml/MainInterface.qml
@@ -149,17 +149,6 @@ Rectangle {
                     }
                 }
             }
-
-            Connections {
-                target: player.videoTracks
-                onDataChanged: {
-                    if (player.videoTracks.rowCount() > 0
-                            && player.playingState === PlayerController.PLAYING_STATE_PLAYING
-                            && history.current.view !== "player") {
-                        history.push(["player"])
-                    }
-                }
-            }
         }
     }
 
-- 
2.25.1



More information about the vlc-devel mailing list