diff options
| author | Jin Liu <[email protected]> | 2024-02-17 11:14:46 +0000 |
|---|---|---|
| committer | Jin Liu <[email protected]> | 2024-02-17 11:14:46 +0000 |
| commit | c9c3531c0b6da07de8f90761a3d799ace62f8e89 (patch) | |
| tree | e03fa5263d491c31cabf3cad429adf2297f768d2 /src/kitemviews/kfileitemmodel.cpp | |
| parent | cda139ccab2c78ac71a9f2aad286cbe1ace46734 (diff) | |
Improve DnD handling in read-only dirs
1. Places panel and tabbar update drag status in read-only dir
2. Don't create drop job in readonly directories
Diffstat (limited to 'src/kitemviews/kfileitemmodel.cpp')
| -rw-r--r-- | src/kitemviews/kfileitemmodel.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/kitemviews/kfileitemmodel.cpp b/src/kitemviews/kfileitemmodel.cpp index f9bab74cd..99a3d163f 100644 --- a/src/kitemviews/kfileitemmodel.cpp +++ b/src/kitemviews/kfileitemmodel.cpp @@ -12,6 +12,7 @@ #include "dolphin_generalsettings.h" #include "dolphindebug.h" #include "private/kfileitemmodelsortalgorithm.h" +#include "views/draganddrophelper.h" #include <KDirLister> #include <KIO/Job> @@ -348,7 +349,7 @@ bool KFileItemModel::supportsDropping(int index) const } else { item = fileItem(index); } - return !item.isNull() && ((item.isDir() && item.isWritable()) || item.isDesktopFile()); + return !item.isNull() && DragAndDropHelper::supportsDropping(item); } QString KFileItemModel::roleDescription(const QByteArray &role) const |
