X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/blobdiff_plain/16a3aea6a629a91aab937be5c111b64b3ed6cf86..76a46fd9094b17eb99e8a42cca8562fdc0b3814c:/src/kitemviews/kitemlistcontroller.cpp diff --git a/src/kitemviews/kitemlistcontroller.cpp b/src/kitemviews/kitemlistcontroller.cpp index a80869dfc..0c25ebb8b 100644 --- a/src/kitemviews/kitemlistcontroller.cpp +++ b/src/kitemviews/kitemlistcontroller.cpp @@ -2,8 +2,7 @@ * Copyright (C) 2011 by Peter Penz * * Copyright (C) 2012 by Frank Reininghaus * * * - * Based on the Itemviews NG project from Trolltech Labs: * - * http://qt.gitorious.org/qt-labs/itemviews-ng * + * Based on the Itemviews NG project from Trolltech Labs * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * @@ -930,8 +929,13 @@ bool KItemListController::dragMoveEvent(QGraphicsSceneDragDropEvent* event, cons m_view->hideDropIndicator(); } - event->setAccepted(!DragAndDropHelper::urlListMatchesUrl(event->mimeData()->urls(), hoveredDir)); - + if (DragAndDropHelper::urlListMatchesUrl(event->mimeData()->urls(), hoveredDir)) { + event->setDropAction(Qt::IgnoreAction); + event->ignore(); + } else { + event->setDropAction(event->proposedAction()); + event->accept(); + } return false; } @@ -1215,7 +1219,7 @@ void KItemListController::startDragging() const QPoint hotSpot((pixmap.width() / pixmap.devicePixelRatio()) / 2, 0); drag->setHotSpot(hotSpot); - drag->exec(Qt::MoveAction | Qt::CopyAction | Qt::LinkAction, Qt::CopyAction); + drag->exec(Qt::MoveAction | Qt::CopyAction | Qt::LinkAction, Qt::MoveAction); QAccessibleEvent accessibilityEvent(view(), QAccessible::DragDropStart); QAccessible::updateAccessibility(&accessibilityEvent);