dorpping files to playlist broken?

Nanno Langstraat langstr at gmail.com
Sat Apr 24 14:37:22 CEST 2010


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

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.kde.org/pipermail/amarok-devel/attachments/20100424/7327bdd1/attachment.htm 


More information about the Amarok-devel mailing list