From 39b77e9861c1318bff1a26627dde3fd1c9c71861 Mon Sep 17 00:00:00 2001 From: Emmanuel Pescosta Date: Mon, 5 Jan 2015 12:50:53 +0100 Subject: [PATCH] Always connect the drop job result with DolphinView::slotPasteJobResult to receive the error message in case of an error also when the destUrl is not equal to the current url in the view. CCMAIL: faure@kde.org --- src/views/dolphinview.cpp | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/src/views/dolphinview.cpp b/src/views/dolphinview.cpp index 32e182ce7..4129cc217 100644 --- a/src/views/dolphinview.cpp +++ b/src/views/dolphinview.cpp @@ -1048,12 +1048,15 @@ void DolphinView::dropUrls(const QUrl &destUrl, QDropEvent *dropEvent) { KIO::DropJob* job = DragAndDropHelper::dropUrls(destUrl, dropEvent, this); - if (job && destUrl == url()) { - // Mark the dropped urls as selected. - m_clearSelectionBeforeSelectingNewItems = true; - m_markFirstNewlySelectedItemAsCurrent = true; - connect(job, &KIO::DropJob::itemCreated, this, &DolphinView::slotItemCreated); + if (job) { connect(job, &KIO::DropJob::result, this, &DolphinView::slotPasteJobResult); + + if (destUrl == url()) { + // Mark the dropped urls as selected. + m_clearSelectionBeforeSelectingNewItems = true; + m_markFirstNewlySelectedItemAsCurrent = true; + connect(job, &KIO::DropJob::itemCreated, this, &DolphinView::slotItemCreated); + } } }