diff options
| -rw-r--r-- | src/dolphincolumnwidget.cpp | 14 | ||||
| -rw-r--r-- | src/dolphindetailsview.cpp | 14 | ||||
| -rw-r--r-- | src/dolphiniconsview.cpp | 9 |
3 files changed, 3 insertions, 34 deletions
diff --git a/src/dolphincolumnwidget.cpp b/src/dolphincolumnwidget.cpp index ab7945ea7..9a500df6b 100644 --- a/src/dolphincolumnwidget.cpp +++ b/src/dolphincolumnwidget.cpp @@ -247,20 +247,6 @@ void DolphinColumnWidget::dragMoveEvent(QDragMoveEvent* event) } } setDirtyRegion(m_dropRect); - - bool destIsDir = false; - if (index.isValid()) { - const KFileItem item = itemForIndex(index); - if (!item.isNull() && item.isDir()) { - m_dropRect = visualRect(index); - destIsDir = true; - } - } else { // dropping on viewport - destIsDir = true; - } - if (destIsDir && event->mimeData()->hasUrls()) { - event->acceptProposedAction(); - } } void DolphinColumnWidget::dropEvent(QDropEvent* event) diff --git a/src/dolphindetailsview.cpp b/src/dolphindetailsview.cpp index f58b4cd1e..46752fc95 100644 --- a/src/dolphindetailsview.cpp +++ b/src/dolphindetailsview.cpp @@ -278,20 +278,6 @@ void DolphinDetailsView::dragMoveEvent(QDragMoveEvent* event) } setDirtyRegion(m_dropRect); } - - bool destIsDir = false; - if (index.isValid()) { - const KFileItem item = itemForIndex(index); - if (!item.isNull() && item.isDir()) { - m_dropRect = visualRect(index); - destIsDir = true; - } - } else { // dropping on viewport - destIsDir = true; - } - if (destIsDir && event->mimeData()->hasUrls()) { - event->acceptProposedAction(); - } } void DolphinDetailsView::dropEvent(QDropEvent* event) diff --git a/src/dolphiniconsview.cpp b/src/dolphiniconsview.cpp index 8d474f4bc..05b8ed9cc 100644 --- a/src/dolphiniconsview.cpp +++ b/src/dolphiniconsview.cpp @@ -225,17 +225,14 @@ void DolphinIconsView::dragMoveEvent(QDragMoveEvent* event) setDirtyRegion(m_dropRect); m_dropRect.setSize(QSize()); // set as invalid - bool destIsDir = false; if (index.isValid()) { const KFileItem item = itemForIndex(index); - if (!item.isNull() && item.isDir()) { + if (!item.isNull()) { m_dropRect = visualRect(index); - destIsDir = true; } - } else { // dropping on viewport - destIsDir = true; } - if (destIsDir && event->mimeData()->hasUrls()) { + if (event->mimeData()->hasUrls()) { + // accept url drops, independently from the destination item event->acceptProposedAction(); } |
