Commit 83021e8
feat: add trash file drop support
Added functionality to handle file drops on the trash icon in the task
manager
1. Implemented moveFilesToTrash method that converts URL paths to local
files and moves them to system trash
2. Added file drop detection for "dde-trash" item ID with proper debug
logging
3. Included necessary Qt headers for file operations (QFile, QFileInfo,
QProcess, QUrl)
4. Added error handling for empty file paths with warning messages
feat: 添加回收站文件拖放支持
在任务管理器中添加了对回收站图标的文件拖放处理功能
1. 实现了moveFilesToTrash方法,将URL路径转换为本地文件并移动到系统回收站
2. 添加了对"dde-trash"项目ID的文件拖放检测,包含适当的调试日志
3. 包含了文件操作所需的Qt头文件(QFile、QFileInfo、QProcess、QUrl)
4. 为空的文件路径添加了错误处理,包含警告消息
Pms: BUG-2710911 parent 3c507cd commit 83021e8
2 files changed
+26
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
| 26 | + | |
| 27 | + | |
26 | 28 | | |
27 | 29 | | |
28 | 30 | | |
| |||
269 | 271 | | |
270 | 272 | | |
271 | 273 | | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
272 | 281 | | |
273 | 282 | | |
274 | 283 | | |
| |||
282 | 291 | | |
283 | 292 | | |
284 | 293 | | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
285 | 308 | | |
286 | 309 | | |
287 | 310 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
97 | 97 | | |
98 | 98 | | |
99 | 99 | | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
100 | 103 | | |
101 | 104 | | |
102 | 105 | | |
| |||
0 commit comments