From aa229c536b84d120e0b74661db10044f64d5a5b2 Mon Sep 17 00:00:00 2001 From: Rafał Lichwała Date: Fri, 13 Feb 2026 17:10:05 +0100 Subject: dolphinview: indicate drops from Places view This commit corrects previous attempt of bug fix done in https://invent.kde.org/frameworks/kio/-/commit/71b2b38b0c4fc4c7820fd95b031413d854d8f8c6?merge_request_iid=2074 which incorrectly recognized drop action from Places View (based only on missing Qt::MoveAction which had side effects described in BUG 514697) This time DolphinView indicates that the given dropEvent comes from Places View so we must avoid potentially destructive Move-like plugins actions. This is done by setting proper KIO::DropJobFlags additional flag for KIO::drop(). CCBUG: 509231 CCBUG: 514697 --- src/views/draganddrophelper.h | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) (limited to 'src/views/draganddrophelper.h') diff --git a/src/views/draganddrophelper.h b/src/views/draganddrophelper.h index 73043febc..45f7e5dc9 100644 --- a/src/views/draganddrophelper.h +++ b/src/views/draganddrophelper.h @@ -11,6 +11,7 @@ #include "dolphin_export.h" #include +#include #include #include @@ -33,14 +34,16 @@ public: * offered to the user. The drag destination must represent a directory or * a desktop-file, otherwise the dropping gets ignored. * - * @param destUrl URL of the item destination. Is used only if destItem::isNull() - * is true. - * @param event Drop event. - * @param window Widget where the drop happened, will be used as parent of the drop menu. - * @return KIO::DropJob pointer or null in case the destUrl is contained - * in the mimeData url list. + * @param destUrl URL of the item destination. Is used only if destItem::isNull() + * is true. + * @param event Drop event. + * @param window Widget where the drop happened, will be used as parent of the drop menu. + * @param dropjobFlags Additional KIO::DropJobFlags passed to KIO::drop + * @return KIO::DropJob pointer or null in case the destUrl is contained + * in the mimeData url list. */ - static KIO::DropJob *dropUrls(const QUrl &destUrl, QDropEvent *event, QWidget *window); + static KIO::DropJob * + dropUrls(const QUrl &destUrl, QDropEvent *event, QWidget *window, KIO::DropJobFlags dropjobFlags = KIO::DropJobFlag::DropJobDefaultFlags); /** * Checks if the destination supports dropping. -- cgit v1.3.1