give KCategorizedView the chance to react on dragMoveEvents()

CCBUG: 208646

svn path=/trunk/KDE/kdebase/apps/; revision=1062054
This commit is contained in:
Peter Penz 2009-12-13 17:00:11 +00:00
parent b6bd25b4a7
commit 5d5d5c8e80

View file

@ -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)