[vlc-commits] [Git][videolan/vlc][master] qml: do not delay owning the drag in ListViewExt

François Cartegnie (@fcartegnie) gitlab at videolan.org
Fri Sep 27 05:29:43 UTC 2024



François Cartegnie pushed to branch master at VideoLAN / VLC


Commits:
803a3fd6 by Fatih Uzunoglu at 2024-09-27T05:04:35+00:00
qml: do not delay owning the drag in ListViewExt

Qt 5.15 used to cause `QDragEnterEvent` to be
posted before `QDragLeaveEvent` is posted.

The ordering seems to be fixed with Qt 6. Qt 6.2
and 6.7 are checked.

- - - - -


1 changed file:

- modules/gui/qt/widgets/qml/ListViewExt.qml


Changes:

=====================================
modules/gui/qt/widgets/qml/ListViewExt.qml
=====================================
@@ -365,14 +365,9 @@ ListView {
 
     function updateItemContainsDrag(item, set) {
         if (set) {
-            // This callLater is needed because in Qt 5.15,
-            // an item might set itemContainsDrag, before
-            // the owning item releases it.
-            Qt.callLater(function() {
-                if (itemContainsDrag)
-                    console.debug(item + " set itemContainsDrag before it was released!")
-                itemContainsDrag = item
-            })
+            if (itemContainsDrag)
+                console.debug(item + " set itemContainsDrag before it was released!")
+            itemContainsDrag = item
         } else {
             if (itemContainsDrag !== item)
                 console.debug(item + " released itemContainsDrag that is not owned!")



View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/803a3fd621addcafb27eeb78fedb53f2eb7ac6b6

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/803a3fd621addcafb27eeb78fedb53f2eb7ac6b6
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