diff options
| author | Rafael Fernández López <[email protected]> | 2007-12-18 21:11:33 +0000 |
|---|---|---|
| committer | Rafael Fernández López <[email protected]> | 2007-12-18 21:11:33 +0000 |
| commit | 2446dd16e89e51e840489cf8cc1628116d323f36 (patch) | |
| tree | 90cd6968843642441d5494a211635f15616feca0 /src | |
| parent | 665ca266e9a6cedb1a014b730e64c91f3c57e11d (diff) | |
The order is important, also is important to accept the event on the move event. While on the dock tree view we were always getting a forbidden cursor with no
possibility to drop, now we can nicely drop :)
CCMAIL: [email protected]
svn path=/trunk/KDE/kdebase/apps/; revision=750176
Diffstat (limited to 'src')
| -rw-r--r-- | src/sidebartreeview.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/sidebartreeview.cpp b/src/sidebartreeview.cpp index af676541a..d580cbf6d 100644 --- a/src/sidebartreeview.cpp +++ b/src/sidebartreeview.cpp @@ -106,10 +106,12 @@ void SidebarTreeView::startDrag(Qt::DropActions supportedActions) void SidebarTreeView::dragEnterEvent(QDragEnterEvent* event) { + QTreeView::dragEnterEvent(event); + if (event->mimeData()->hasUrls()) { event->acceptProposedAction(); } - QTreeView::dragEnterEvent(event); + m_dragging = true; } @@ -131,6 +133,11 @@ void SidebarTreeView::dragMoveEvent(QDragMoveEvent* event) setDirtyRegion(m_dropRect); m_dropRect = visualRect(index); setDirtyRegion(m_dropRect); + + if (event->mimeData()->hasUrls()) { + // accept url drops, independently from the destination item + event->acceptProposedAction(); + } } void SidebarTreeView::dropEvent(QDropEvent* event) |
