┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/views/draganddrophelper.cpp
diff options
context:
space:
mode:
authorRafał Lichwała <[email protected]>2026-02-13 17:10:05 +0100
committerMéven Car <[email protected]>2026-02-15 10:22:01 +0000
commitaa229c536b84d120e0b74661db10044f64d5a5b2 (patch)
treecda6efb6b162bb79770d6f141d7573531ab934a0 /src/views/draganddrophelper.cpp
parent768c59f4669cd0e32f48d0ca65fa62b3c71eefb5 (diff)
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
Diffstat (limited to 'src/views/draganddrophelper.cpp')
-rw-r--r--src/views/draganddrophelper.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/views/draganddrophelper.cpp b/src/views/draganddrophelper.cpp
index a98483a79..125e4e79c 100644
--- a/src/views/draganddrophelper.cpp
+++ b/src/views/draganddrophelper.cpp
@@ -34,7 +34,7 @@ bool DragAndDropHelper::urlListMatchesUrl(const QList<QUrl> &urls, const QUrl &d
return *m_urlListMatchesUrlCache.insert(destUrl, destUrlMatches);
}
-KIO::DropJob *DragAndDropHelper::dropUrls(const QUrl &destUrl, QDropEvent *event, QWidget *window)
+KIO::DropJob *DragAndDropHelper::dropUrls(const QUrl &destUrl, QDropEvent *event, QWidget *window, KIO::DropJobFlags dropjobFlags)
{
const QMimeData *mimeData = event->mimeData();
if (isArkDndMimeType(mimeData)) {
@@ -53,7 +53,7 @@ KIO::DropJob *DragAndDropHelper::dropUrls(const QUrl &destUrl, QDropEvent *event
}
// Drop into a directory or a desktop-file
- KIO::DropJob *job = KIO::drop(event, destUrl);
+ KIO::DropJob *job = KIO::drop(event, destUrl, dropjobFlags);
KJobWidgets::setWindow(job, window);
return job;
}