dorpping files to playlist broken?

Mathias Panzenböck grosser.meister.morti at gmx.net
Sat Apr 24 14:45:10 CEST 2010


On 04/24/2010 02:37 PM, Nanno Langstraat wrote:
> Mathias Panzenböck wrote:
>>>> Dropping files from my KDE Desktop into amaroks playlist seems to be broken.
>
> Pfew!
>
> a) I can reproduce your exact fail mode.
>
> b) I found the culprit. It's a bug in Qt!
>
> It's unrelated to my MIME changes, this line in PrettyListView.cpp
> triggers it:
> setMouseTracking( true );
>
> introduced in commit 234138ba372e3be466c216fcdd564c2e50915b7a by
> Oleksandr Khayrullin and Nikolaj.
>
>
> --
> The code in Qt that detects the start of a mouse drag is pretty fragile
> (IMHO). See 'mouseMoveEvent()' in
> http://qt.gitorious.org/qt/qt/blobs/master/src/gui/itemviews/qabstractitemview.cpp
>
> It 1) never checks the state of the mouse buttons, nor 2) does it check
> whether another drag is already in progress.
>
> Apparently crusty old code that Trolltech didn't update when they
> introduced the 'setMouseTracking()' feature.
>
>
> --
> Oleksandr Khayrullin / Nikolaj, you have 2 ways to work around this bug:
>
>     * Don't use 'setMouseTracking()' for the foreseeable future.
>
>     * Override 'mouseMoveEvent()', and only call
>       'QListView::mouseMoveEvent()' if 'event->buttons != 0'.
>
>
> Cheers,
> Nanno

Great that the bug is identified! I hope there will be a fix in Qt 4.7 (or 4.6.3 if there will be 
such a version). Did you report the bug?

	-panzi


More information about the Amarok-devel mailing list