[vlc-devel] [PATCH 9/9] qml: postpone the creation of the dialogs

Pierre Lamot pierre at videolabs.io
Fri Aug 28 16:25:56 CEST 2020


---
 .../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
         }
-- 
2.25.1



More information about the vlc-devel mailing list