]> cloud.milkyroute.net Git - dolphin.git/commitdiff
Always connect the drop job result with DolphinView::slotPasteJobResult
authorEmmanuel Pescosta <emmanuelpescosta099@gmail.com>
Mon, 5 Jan 2015 11:50:53 +0000 (12:50 +0100)
committerEmmanuel Pescosta <emmanuelpescosta099@gmail.com>
Mon, 5 Jan 2015 11:50:53 +0000 (12:50 +0100)
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

index 32e182ce7c15bf1518b7e928cfff99188e7605af..4129cc2174a82322cc585f820a07b05ead100c4b 100644 (file)
@@ -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);
+        }
     }
 }