┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/views/draganddrophelper.cpp
AgeCommit message (Collapse)Author
2026-02-15dolphinview: indicate drops from Places viewRafał Lichwała
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
2026-02-01DragAndDropHelper: Remove check for acceptable dropKai Uwe Broulik
The mentioned Qt Wayland fix that makes us properly reject drops has long been released by now.
2026-02-01Support drop onto executable to run itKai Uwe Broulik
We already support dropping onto desktop files. This is also something that KDirOperator did but Dolphin does not.
2024-07-01Revert "DragAndDropHelper::updateDropAction: use StatJob for remote URLs"Felix Ernst
This reverts commit dc149ec5e52f52c514cf362603d05ba8eea506b8. This prevents a crash. One issue identified is that the commit that I am reverting here accesses a QDropEvent at a moment in time in which it might have already been deleted. We cannot check if it exists by that time because we do not control its lifetime and it is not a QObject.
2024-02-29DragAndDropHelper::updateDropAction: use StatJob for remote URLsJin Liu
When dragging onto tabs/Places from a remote URL, we don't process the QDropEvent immediately, but start a StatJob and process the event when it finishes. Also, the result of the StatJob is cached for 30 seconds, to avoid starting duplicate jobs.
2024-02-27Fix: can't drop into remote dirJin Liu
KFileItem::isDir() only works when it's created from listDir(), or from a local QUrl. For a remote QUrl, isDir always returns false, so we can't use that in supportsDropping(). As a workaround, now supportsDropping() always returns true in remote dirs -- we don't check if a remote dir is writable when dropping.
2024-02-17Improve DnD handling in read-only dirsJin Liu
1. Places panel and tabbar update drag status in read-only dir 2. Don't create drop job in readonly directories
2023-12-25Fix issues if QT_NO_CAST_FROM_ASCII is definedMarius P
Fix issues e.g. "error: ‘QString::QString(const QByteArray&)’ is private within this context".
2023-02-05Add clang-format and format code as in FrameworksSerg Podtynnyi
2022-04-11[Places Panel] Support drag and drop from ArkKai Uwe Broulik
Accepts Ark's special dnd mime types so that archive contents can be dragged onto a place to extract and/or (mount and) switch to the hovered location.
2020-08-25Output of licensedigger + manual cleanup afterwards.Elvis Angelaccio
Unfortunately licensedigger does not strip the trailing * characters. While at it, use a common style for all source files.
2019-12-09Fix build with Qt 5.14 RCAntonio Rojas
Add needed Qt includes that are no longer pulled transitively. BUG: 414492 Differential Revision: https://phabricator.kde.org/D25783
2018-03-04Remove unused #includeRoman Inflianskas
Summary: I used CLion inspection to hunt all unused #include Reviewers: #dolphin, elvisangelaccio, markg Reviewed By: #dolphin, elvisangelaccio, markg Subscribers: bcooksley, markg, elvisangelaccio, #dolphin Differential Revision: https://phabricator.kde.org/D10985
2018-03-03Remove unused #includeRoman Inflianskas
Summary: I used CLion inspection to hunt all unused #include Reviewers: #dolphin, elvisangelaccio, markg Reviewed By: #dolphin, elvisangelaccio, markg Subscribers: markg, elvisangelaccio, #dolphin Differential Revision: https://phabricator.kde.org/D10985
2018-02-05Faster drag&drop in directories with thousands of filesJaime Torres
Summary: The check is called when the mouse is moved in a drag&drop operation. Dragging all files in a directory with 3000 files under callgrind, moving the mouse to the other panel and then canceling, doing it twice, callgrind shows that the method urlListMatchesUrl is called around 200 times, spending around 9,30% of the cpu in those calls. Applying the patch, callgrind tells it uses now 0.31% of the cpu in 1208 calls. CCBUG: 342056 Reviewers: #dolphin, elvisangelaccio, markg Reviewed By: #dolphin, elvisangelaccio, markg Subscribers: markg, anthonyfieroni, michaelh, elvisangelaccio, ngraham Differential Revision: https://phabricator.kde.org/D10085
2017-11-21Modernize: Use nullptr everywhereKevin Funk
2017-11-11Prevent folders from drag and dropping onto themselves in dolphin main viewEmirald Mateli
Summary: This patch aims to improve user experience by not allowing the user to drag and drop a folder into itself. The current behavior shows a red message at the top which can then be closed by the user, instead of relying on that, this patch disables the option of dropping onto self and uses the "Invalid drop target cursor" to highlight the behavior. BUG: 307747 Since spectacle is unable to screenshot the cursor overlay, find attached a photo of the screen. {F3787651} Test Plan: 1. Drag a folder. 2. Drop it onto itself. Reviewers: #dolphin, elvisangelaccio, ngraham, rkflx, dfaure Reviewed By: #dolphin, elvisangelaccio, rkflx, dfaure Subscribers: rkflx, ngraham, elvisangelaccio, dfaure, anthonyfieroni, #konqueror Tags: #dolphin Differential Revision: https://phabricator.kde.org/D6281
2016-03-16[CLAZY] Fixed all level 1 and level 2 warnings with small exceptionsArtur Puzio
REVIEW: 126771
2015-02-06Clean up includesMontel Laurent
2015-01-05Dolphin: port from KonqOperations::doDrop to the new KIO::DropJobDavid Faure
REVIEW: 121678
2014-11-10make use of initializer listsEmmanuel Pescosta
2014-10-21port Dolphin from KUrl to QUrlLukáš Tinkl
REVIEW: 120688
2014-10-18Fix includesMontel Laurent
2014-07-16Use xi18n when text has markupMontel Laurent
2013-01-09Fix Bug 233335 - Wrong icons selected after pasting files and renaming them ↵Emmanuel Pescosta
(because there exists items with it's names Fixed the "same" buggy behavior when dropping files/folders Select also putted files (PUT operation - SimpleJob) - e.g. Paste content from clipboard BUG: 233335 REVIEW: 107351
2012-08-26Adjust to Ark's drag'n'drop D-Bus interface changes.Raphael Kubo da Costa
Ark's drag'n'drop D-Bus interface needs to be changed: so far, the object path was always /DndExtract, but this does not work if Ark is being used as an embedded KPart (in Konqueror or Rekonq, for example), as all tabs will end up calling QDBusConnection::registerObject() with the same path. Only the first call will work, and the result is that dragging and dropping from any tab previewing an archive with Ark will extract from the first archive being previewed. To fix that, applications that accept the application/x-kde-dndextract mimetype should now be adjusted to check the application/x-kde-ark-dndextract-service and application/x-kde-ark-dndextract-path ones instead; the former contains the same service information that used to be passed, while the latter tells which object path should be talked to. This is the Dolphin part of the change, which also needs to be made to the folderview plasmoid. REVIEW: 106131 CCBUG: 304860
2012-02-23Whitespace cleanups and documentation fixesPeter Penz
2012-02-08Drag and drop: Adjust destination if the item is no directory or desktop-filePeter Penz
The URL of the view should be used as destination target if a dropping is not done above a directory or desktop-file. BUG: 293511 FIXED-IN: 4.8.1
2012-01-30Fix drag & drop issues with non-local URLsPeter Penz
BUG: 292821 BUG: 292355 FIXED-IN: 4.8.1
2011-12-20Show an error when dragging above a folder without write accessPeter Penz
Got OK from the translator team to add this new string.
2011-12-10Show error-message when dropping a folder into itselfPeter Penz
Thanks to Janardhan Reddy for the analysis of the issue! BUG: 283646 FIXED-IN: 4.8.0
2011-12-06Folders Panel cleanupsPeter Penz
- Reactivate dropping of URLs - Remove unused/obsolete code - Simplify DragAndDropHelper interface
2011-09-04Improved drag and drop supportPeter Penz
2011-05-01Use pathOrUrl() instead of path() for application/x-kde-dndextract.Raphael Kubo da Costa
This makes it possible to extract to remote locations or, say, trash:/ when everything is properly set up in Ark's side. CCMAIL: [email protected] (cherry picked from commit 5307f8ee2457387361e85517df38979bceeafb2a)
2011-02-09Coding style update for pointer comparisonPeter Penz
Most developers seem to prefer if (ptr) ... if (!ptr) ... in comparison to if (ptr != 0) ... if (ptr == 0) ... Adjusted the Dolphin-code to use the "most-prefered style" to make contributors happy.
2011-02-04Update e-mail address from [email protected] to [email protected]Peter Penz
2011-02-04Use capitalized KDE includesPeter Penz
2010-11-26DragAndDropHelper::isMimeTypeSupported() returns always true in the meantime ↵Peter Penz
- remove it svn path=/trunk/KDE/kdebase/apps/; revision=1201101
2010-10-15Enable dropping of raw data, like one could do in KDE3. It's actually ↵David Faure
working fine with text data for instance, only image data is still an issue due to bugs in Qt. This will be in KDE 4.6. CCBUG: 159337 svn path=/trunk/KDE/kdebase/apps/; revision=1186021
2010-07-24Sourcecode hierarchy cleanup: Move further files from src to src/viewsPeter Penz
svn path=/trunk/KDE/kdebase/apps/; revision=1154150