From 5d5d5c8e803159857bc29a7f83077426d5694a17 Mon Sep 17 00:00:00 2001 From: Peter Penz Date: Sun, 13 Dec 2009 17:00:11 +0000 Subject: [PATCH] give KCategorizedView the chance to react on dragMoveEvents() CCBUG: 208646 svn path=/trunk/KDE/kdebase/apps/; revision=1062054 --- src/dolphiniconsview.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/dolphiniconsview.cpp b/src/dolphiniconsview.cpp index e7448ed6d5..871fd5fbd2 100644 --- a/src/dolphiniconsview.cpp +++ b/src/dolphiniconsview.cpp @@ -199,12 +199,14 @@ void DolphinIconsView::dragEnterEvent(QDragEnterEvent* event) void DolphinIconsView::dragLeaveEvent(QDragLeaveEvent* event) { - Q_UNUSED(event); + KCategorizedView::dragLeaveEvent(event); setDirtyRegion(m_dropRect); } void DolphinIconsView::dragMoveEvent(QDragMoveEvent* event) { + KCategorizedView::dragMoveEvent(event); + // TODO: remove this code when the issue #160611 is solved in Qt 4.4 const QModelIndex index = indexAt(event->pos()); setDirtyRegion(m_dropRect); @@ -231,6 +233,8 @@ void DolphinIconsView::dropEvent(QDropEvent* event) const QModelIndex index = indexAt(event->pos()); const KFileItem item = m_controller->itemForIndex(index); m_controller->indicateDroppedUrls(item, m_controller->url(), event); + // don't call KCategorizedView::dropEvent(event), as it moves + // the items which is not wanted } QModelIndex DolphinIconsView::moveCursor(CursorAction cursorAction, Qt::KeyboardModifiers modifiers)