Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-5441

Provide a way to mark a drop finished asynchronously



    • Suggestion
    • Resolution: Unresolved
    • P3: Somewhat important
    • None
    • 4.5.3
    • GUI: Drag and Drop
    • None


      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.


        No reviews matched the request. Check your Options in the drop-down menu of this sections header.



            Unassigned Unassigned
            tokoe Tobias Koenig
            1 Vote for this issue
            1 Start watching this issue



              Gerrit Reviews

                There are no open Gerrit changes