[vlc-commits] qml: postpone the creation of the dialogs

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


vlc | branch: master | Pierre Lamot <pierre at videolabs.io> | Thu Aug 27 18:21:20 2020 +0200| [0e1148fef09ef3fc0b4c05fa076ca098f42a0013] | committer: Pierre Lamot

qml: postpone the creation of the dialogs

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

 modules/gui/qt/maininterface/qml/MainInterface.qml | 16 +++++++++++++---
 1 file changed, 13 insertions(+), 3 deletions(-)

diff --git a/modules/gui/qt/maininterface/qml/MainInterface.qml b/modules/gui/qt/maininterface/qml/MainInterface.qml
index 714e637b85..2e3dd9b8ef 100644
--- a/modules/gui/qt/maininterface/qml/MainInterface.qml
+++ b/modules/gui/qt/maininterface/qml/MainInterface.qml
@@ -34,6 +34,7 @@ Rectangle {
     property bool _playlistReady: false
 
     property alias mainInterfaceRect: root
+    property variant g_dialogs: dialogsLoader.item
 
     Binding {
         target: VLCStyle.self
@@ -163,10 +164,19 @@ Rectangle {
         }
     }
 
-    DG.Dialogs {
-        id: g_dialogs
+    Loader {
+        id: dialogsLoader
+
         anchors.fill: parent
-        bgContent: root
+        asynchronous: true
+        source: "qrc:///dialogs/Dialogs.qml"
+
+        onLoaded:  {
+            item.bgContent = root
+        }
+    }
+    Connections {
+        target: dialogsLoader.item
         onRestoreFocus: {
             stackView.focus = true
         }



More information about the vlc-commits mailing list