Patch: auto-open folder when dragging over it (KListView)

Waldo Bastian bastian at kde.org
Thu Nov 28 21:34:52 GMT 2002


On Thursday 28 November 2002 21:18, David Faure wrote:
> A possible bug in this patch: an independent event (e.g. KDirWatch) could
> delete the item under the mouse, and then dragOverItem would be a dangling
> pointer... Hmm, QListView has no signal for "deleting this item", and we
> can't rely on items being KListViewItems. Tricky.

What about storing the last mouse position as well and newly looking up the 
QListViewItem when needed, comparing it with dragOverItem, and only using 
dragOverItem if it is still the same?

Looking at the patch, that would only need to be done in 
KListView::slotDragExpand() then.

Cheers,
Waldo




More information about the kde-core-devel mailing list