mirror of
https://invent.kde.org/system/dolphin
synced 2024-11-05 18:47:12 +00:00
give KCategorizedView the chance to react on dragMoveEvents()
CCBUG: 208646 svn path=/trunk/KDE/kdebase/apps/; revision=1062054
This commit is contained in:
parent
b6bd25b4a7
commit
5d5d5c8e80
1 changed files with 5 additions and 1 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue