Details
-
Suggestion
-
Status: Reported
-
P3: Somewhat important
-
Resolution: Unresolved
-
4.5.3
-
None
-
None
Description
The current implementation of drag'n'drop does not allow the user to defer the signal that marks a drop as finished. As soon as the target widget
leaves the event handler method, the XdndFinished signal is sent to the source application (dnd_x11.cpp:1185).
According to the XDND spec, the source application can create a temporary file, write in all the data it wants to transmit, passes the url of
the temporary file as text/uri-list and wait until the target application has sent the XdndFinished signal, so that it can remove the temporary file again.
However with the current implementation that implies that all Qt applications have to read in (or copy somehow) the temporary file inside the
event handler method, because when leaving the event handler method, the temporary file might be gone.
For large files that results in a blocking GUI which is a no-go...
Do you see any chance to provide API to mark the drop as done later on? So that in the drop event handler you just set a flag that you
want to finish it later and you keep a reference to the drop object. When you have finished processing the file, you call 'finished()' on the
stored drop object reference and the XdndFinished signal will be sent.