[vlc-commits] qml: don't preload About and Player page component

Pierre Lamot git at videolan.org
Mon Sep 21 10:23:47 CEST 2020


vlc | branch: master | Pierre Lamot <pierre at videolabs.io> | Wed Aug 26 17:44:58 2020 +0200| [0f4db81bfd9e357c320f317a9c6a173327c468bf] | committer: Pierre Lamot

qml: don't preload About and Player page component

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

 modules/gui/qt/dialogs/help/qml/About.qml          |  4 ++++
 modules/gui/qt/maininterface/qml/MainInterface.qml | 24 ++--------------------
 2 files changed, 6 insertions(+), 22 deletions(-)

diff --git a/modules/gui/qt/dialogs/help/qml/About.qml b/modules/gui/qt/dialogs/help/qml/About.qml
index 2287ba3c6a..e561932291 100644
--- a/modules/gui/qt/dialogs/help/qml/About.qml
+++ b/modules/gui/qt/dialogs/help/qml/About.qml
@@ -28,6 +28,10 @@ Widgets.NavigableFocusScope {
     id: root
     property alias columnLayout: columnLayout
 
+    onActionCancel: {
+        history.previous()
+    }
+
     AboutModel {
         id: about
     }
diff --git a/modules/gui/qt/maininterface/qml/MainInterface.qml b/modules/gui/qt/maininterface/qml/MainInterface.qml
index ec7f95616f..0002be58ea 100644
--- a/modules/gui/qt/maininterface/qml/MainInterface.qml
+++ b/modules/gui/qt/maininterface/qml/MainInterface.qml
@@ -24,8 +24,6 @@ import org.videolan.vlc 0.1
 import "qrc:///widgets/" as Widgets
 import "qrc:///style/"
 
-import "qrc:///player/" as Player
-import "qrc:///about/" as AB
 import "qrc:///dialogs/" as DG
 import "qrc:///playlist/" as PL
 import QtQuick.Window 2.11
@@ -77,29 +75,11 @@ Rectangle {
         }
     }
 
-    Component {
-        id: audioplayerComp
-        Player.Player {
-            focus: true
-        }
-    }
-
-    Component {
-        id: aboutComp
-        AB.About {
-            focus: true
-            onActionCancel: {
-                console.log("onActionCancel")
-                history.previous()
-            }
-        }
-    }
-
     readonly property var pageModel: [
-        { name: "about", component: aboutComp },
+        { name: "about", url: "qrc:///about/About.qml" },
         { name: "mc", url: "qrc:///medialibrary/MainDisplay.qml" },
         { name: "playlist", url: "qrc:///playlist/PlaylistMainView.qml" },
-        { name: "player", component: audioplayerComp },
+        { name: "player", url:"qrc:///player/Player.qml" },
     ]
 
     function loadCurrentHistoryView() {



More information about the vlc-commits mailing list