diff options
Diffstat (limited to 'src/views/dolphinview.cpp')
| -rw-r--r-- | src/views/dolphinview.cpp | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/views/dolphinview.cpp b/src/views/dolphinview.cpp index 7e01b9a93..b01833d69 100644 --- a/src/views/dolphinview.cpp +++ b/src/views/dolphinview.cpp @@ -36,6 +36,7 @@ #include <KDesktopFile> #include <KDirModel> #include <KFileItemListProperties> +#include <KFilePlacesView> #include <KFormat> #include <KIO/CopyJob> #include <KIO/DeleteOrTrashJob> @@ -1426,7 +1427,16 @@ void DolphinView::slotItemDropEvent(int index, QGraphicsSceneDragDropEvent *even void DolphinView::dropUrls(const QUrl &destUrl, QDropEvent *dropEvent, QWidget *dropWidget) { - KIO::DropJob *job = DragAndDropHelper::dropUrls(destUrl, dropEvent, dropWidget); + KIO::DropJobFlags dropjobFlags; +#if KIO_VERSION >= QT_VERSION_CHECK(6, 23, 0) + if (qobject_cast<KFilePlacesView *>(dropEvent->source())) { + // this drop comes from Places View so we want to avoid + // potentially destructive Move-like plugins actions + dropjobFlags |= KIO::DropJobFlag::ExcludePluginsActions; + } +#endif + + KIO::DropJob *job = DragAndDropHelper::dropUrls(destUrl, dropEvent, dropWidget, dropjobFlags); if (job) { connect(job, &KIO::DropJob::result, this, &DolphinView::slotJobResult); |
