[vlc-commits] [Git][videolan/vlc][master] 2 commits: qml: fix reference error in MainInterface.qml

Steve Lhomme (@robUx4) gitlab at videolan.org
Sat Jul 20 11:44:49 UTC 2024



Steve Lhomme pushed to branch master at VideoLAN / VLC


Commits:
b0ffe8e6 by Fatih Uzunoglu at 2024-07-20T11:04:36+00:00
qml: fix reference error in MainInterface.qml

The parameter for `entered()` handler is `drag`
unlike `dropped()` handler where it is `drop`.

- - - - -
516876cb by Fatih Uzunoglu at 2024-07-20T11:04:36+00:00
qml: make the drop area in MainInterface.qml a leaf node

Such root item should not be a highly specialized type.

- - - - -


1 changed file:

- modules/gui/qt/maininterface/qml/MainInterface.qml


Changes:

=====================================
modules/gui/qt/maininterface/qml/MainInterface.qml
=====================================
@@ -200,15 +200,15 @@ Item {
                 setInitialView()
         }
 
-
         DropArea {
             anchors.fill: parent
+            z: -1
 
             onEntered: (drag) => {
                 // Do not handle internal drag here:
                 if (!drag.source) {
                     // Foreign drag, check if valid:
-                    if (drop.hasUrls || drop.hasText) {
+                    if (drag.hasUrls || drag.hasText) {
                         drag.accepted = true
                         return
                     }
@@ -250,25 +250,25 @@ Item {
                     drop.accept()
                 }
             }
+        }
 
-            Widgets.PageLoader {
-                id: stackView
-                anchors.fill: parent
-                focus: true
-                clip: _extendedFrameVisible
-
-                pageModel: _pageModel
-
-                Connections {
-                    target: Player
-                    function onPlayingStateChanged() {
-                        if (Player.playingState === Player.PLAYING_STATE_STOPPED
-                                && History.match(History.viewPath, ["player"]) ) {
-                            if (History.previousEmpty)
-                                _pushHome()
-                            else
-                                History.previous()
-                        }
+        Widgets.PageLoader {
+            id: stackView
+            anchors.fill: parent
+            focus: true
+            clip: _extendedFrameVisible
+
+            pageModel: _pageModel
+
+            Connections {
+                target: Player
+                function onPlayingStateChanged() {
+                    if (Player.playingState === Player.PLAYING_STATE_STOPPED
+                            && History.match(History.viewPath, ["player"]) ) {
+                        if (History.previousEmpty)
+                            _pushHome()
+                        else
+                            History.previous()
                     }
                 }
             }



View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/e23f2dbdee195a87b267c25ba917c1622260c7d7...516876cb3ce3eb04b6bc33643f66000f7d6f8ba0

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/e23f2dbdee195a87b267c25ba917c1622260c7d7...516876cb3ce3eb04b6bc33643f66000f7d6f8ba0
You're receiving this email because of your account on code.videolan.org.


VideoLAN code repository instance


More information about the vlc-commits mailing list