Skip to content

qml: fix QtQuick views destroying the delegate being dragged

Fatih Uzunoğlu requested to merge fuzun/vlc:qml-drag-fix into master

How to reproduce the problem: populate a QtQuick view (for example, the playqueue), and try dragging an item while scrolling to let the list go out of cache boundaries (for example, try dragging an item from bottom to the top of the list). The view will destroy the delegate and dragging will fail.

An alternative of this would be increasing the cacheBuffer (!469 (closed)). However, that approach would make the application consume more memory by caching all the items regardless they are being dragged as opposed to the one presented in this patch which makes the view not destroy only the ones that are being dragged.

Merge request reports