<div class="gmail_quote">On Mon, May 9, 2011 at 2:00 PM, Ilkka Ollakka <span dir="ltr"><<a href="mailto:ileoo@videolan.org">ileoo@videolan.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div id=":ie">>  void MainInterface::dropEventPlay( QDropEvent *event, bool b_play )<br>
>  {<br>
> -    if( event->possibleActions() & Qt::CopyAction )<br>
> -       event->setDropAction( Qt::CopyAction );<br>
> -    else<br>
> -        return;<br>
> +    if( !( event->possibleActions() & (Qt::CopyAction | Qt::MoveAction) ) ) return;<br>
<br>
Seem ok, but I would like to keep that setDropAction( Qt::CopyAction )<br>
in this case when we accept other actions too for just in case and it<br>
would keep in mind that we don't do move-handling in that code (even if<br>
it's pretty clear in current code).</div></blockquote></div><div><br></div><div>In fact, none of the elements of the Qt::DropAction enum are appropriate for the kind of action we are performing here. We are not doing a copy either...  In that sense I don't see a reason to set the drop action to copy explicitely.</div>
<div>For the same reason I think we could even respond to any action = omit the check entirely.</div><div><br></div><div>Or we could follow the thinking: ok, copy and move make sense, but link action doesn't make sense at all, so we would return if ( proposedAction() == Qt::LinkAction ).</div>
<div><br></div><div>The set of possibleActions() is changed according to keyboard modifiers. All that really matters is just that a simple d&d without any modifiers pressed gets through and enqueues/plays the dropped media.</div>
<div><br></div>