]> cloud.milkyroute.net Git - dolphin.git/commitdiff
Fix DnD onto desktop:/ app desktop file.
authorDavid Faure <faure@kde.org>
Thu, 16 Jun 2016 13:34:44 +0000 (15:34 +0200)
committerDavid Faure <faure@kde.org>
Thu, 16 Jun 2016 13:34:44 +0000 (15:34 +0200)
We need to resolve from desktop:/ to file:/ so that DropJob
can handle application .desktop files.

CCBUG: 363991

src/panels/folders/folderspanel.cpp
src/views/dolphinview.cpp

index 3ad1bf3ffd6743e720578f1c11a3a08f392b4dc6..276cf567208a2d0de82b6c4e7dc1ca28c846d73d 100644 (file)
@@ -240,7 +240,7 @@ void FoldersPanel::slotItemDropEvent(int index, QGraphicsSceneDragDropEvent* eve
                              event->buttons(),
                              event->modifiers());
 
-        KIO::DropJob *job = DragAndDropHelper::dropUrls(destItem.url(), &dropEvent, this);
+        KIO::DropJob *job = DragAndDropHelper::dropUrls(destItem.mostLocalUrl(), &dropEvent, this);
         if (job) {
             connect(job, &KIO::DropJob::result, this, [this](KJob *job) { if (job->error()) emit errorMessage(job->errorString()); });
         }
index c3df3a9a8c9a81fe84688b38e5e0672b2096166f..25aad9b51446021d991bac7b3e21f25b1af92ee8 100644 (file)
@@ -1031,7 +1031,7 @@ void DolphinView::slotItemDropEvent(int index, QGraphicsSceneDragDropEvent* even
         destUrl = url();
     } else {
         // The item represents a directory or desktop-file
-        destUrl = destItem.url();
+        destUrl = destItem.mostLocalUrl();
     }
 
     QDropEvent dropEvent(event->pos().toPoint(),