peony/libpeony-qt/file-operation
likehomedream 986340003b [FIX]【文件管理器】【复制文件】字号设置为标准时,复制文件的进度对话框内容显示截断[LINK]bug#136567 2022-11-25 16:04:32 +08:00
..
file-operation-test Import Upstream version 3.14.4.5 2022-06-06 11:37:01 +08:00
README.md Import Upstream version 3.14.4.5 2022-06-06 11:37:01 +08:00
create-template-operation.cpp Import Upstream version 3.14.4.5 2022-06-06 11:37:01 +08:00
create-template-operation.h Import Upstream version 3.14.4.5 2022-06-06 11:37:01 +08:00
file-copy-operation.cpp [FIX] #104963 【文件管理器】发送文件夹到U盘有错误提示 2022-11-25 16:04:32 +08:00
file-copy-operation.h Import Upstream version 3.14.4.5 2022-06-06 11:37:01 +08:00
file-count-operation.cpp Import Upstream version 3.14.4.5 2022-06-06 11:37:01 +08:00
file-count-operation.h Import Upstream version 3.14.4.5 2022-06-06 11:37:01 +08:00
file-delete-operation.cpp 注释一些频繁的打印debug log 2022-11-25 16:04:31 +08:00
file-delete-operation.h Import Upstream version 3.14.4.5 2022-06-06 11:37:01 +08:00
file-link-operation.cpp 音效需求更新,包括取消'删除',添加'发送快捷方式''还原'等音效 2022-11-25 16:04:30 +08:00
file-link-operation.h Import Upstream version 3.14.4.5 2022-06-06 11:37:01 +08:00
file-move-operation.cpp Fix paste deleted file error not translated issue, link to bug#121093. 2022-11-25 16:04:32 +08:00
file-move-operation.h Import Upstream version 3.14.4.5 2022-06-06 11:37:01 +08:00
file-node-reporter.cpp Import Upstream version 3.14.4.5 2022-06-06 11:37:01 +08:00
file-node-reporter.h Import Upstream version 3.14.4.5 2022-06-06 11:37:01 +08:00
file-node.cpp Import Upstream version 3.14.4.5 2022-06-06 11:37:01 +08:00
file-node.h Import Upstream version 3.14.4.5 2022-06-06 11:37:01 +08:00
file-operation-error-dialog-base.cpp [FIX] #113319 【用例303439】【文件管理器】清空回收站弹窗提示内容和图标与设计图不一致 2022-11-25 16:04:30 +08:00
file-operation-error-dialog-base.h 进一步优化文字布局,对于单行和多行显示设置不同的top margin 2022-11-25 16:04:30 +08:00
file-operation-error-dialog.cpp Import Upstream version 3.14.4.5 2022-06-06 11:37:01 +08:00
file-operation-error-dialog.h Import Upstream version 3.14.4.5 2022-06-06 11:37:01 +08:00
file-operation-error-dialogs.cpp [FIX] #94313 【UKUI V3.1】【文件管理器】删除大于10G的文件夹时,确认弹窗中的选项是“是”和“取消”(期望:两选项是“是”和“否”) 2022-11-25 16:04:30 +08:00
file-operation-error-dialogs.h [FIX] #94313 【UKUI V3.1】【文件管理器】删除大于10G的文件夹时,确认弹窗中的选项是“是”和“取消”(期望:两选项是“是”和“否”) 2022-11-25 16:04:30 +08:00
file-operation-error-handler.h Import Upstream version 3.14.4.5 2022-06-06 11:37:01 +08:00
file-operation-internal-dialog.cpp [FIX] #113319 【用例303439】【文件管理器】清空回收站弹窗提示内容和图标与设计图不一致 2022-11-25 16:04:30 +08:00
file-operation-internal-dialog.h [FIX] #113319 【用例303439】【文件管理器】清空回收站弹窗提示内容和图标与设计图不一致 2022-11-25 16:04:30 +08:00
file-operation-manager.cpp [FIX] #132830 【文件管理器】【PTOF】右键-删除到回收站或者选中文件后点击delete,再点击enter无法删除文件 2022-11-25 16:04:31 +08:00
file-operation-manager.h Import Upstream version 3.14.4.5 2022-06-06 11:37:01 +08:00
file-operation-progress-bar.cpp [FIX]【文件管理器】【复制文件】字号设置为标准时,复制文件的进度对话框内容显示截断[LINK]bug#136567 2022-11-25 16:04:32 +08:00
file-operation-progress-bar.h Fix delete batch of empty file not update progress issue, related to bug#133380,133624. 2022-11-25 16:04:31 +08:00
file-operation-progress-wizard.cpp Import Upstream version 3.14.4.5 2022-06-06 11:37:01 +08:00
file-operation-progress-wizard.h Import Upstream version 3.14.4.5 2022-06-06 11:37:01 +08:00
file-operation.cpp Fix paste \n or \t in file name cause file copy error issue. 2022-11-25 16:04:28 +08:00
file-operation.h Import Upstream version 3.14.4.5 2022-06-06 11:37:01 +08:00
file-operation.pri [FIX] #113319 【用例303439】【文件管理器】清空回收站弹窗提示内容和图标与设计图不一致 2022-11-25 16:04:30 +08:00
file-rename-operation.cpp Import Upstream version 3.14.4.5 2022-06-06 11:37:01 +08:00
file-rename-operation.h Import Upstream version 3.14.4.5 2022-06-06 11:37:01 +08:00
file-trash-operation.cpp Import Upstream version 3.14.4.5 2022-06-06 11:37:01 +08:00
file-trash-operation.h Import Upstream version 3.14.4.5 2022-06-06 11:37:01 +08:00
file-untrash-operation.cpp Import Upstream version 3.14.4.5 2022-06-06 11:37:01 +08:00
file-untrash-operation.h Import Upstream version 3.14.4.5 2022-06-06 11:37:01 +08:00
shared-file-link-operation.cpp [FIX]【共享文件】共享文件夹增加右键发送桌面快捷方式且重启后不会消失 [LINK]80310 2022-11-25 16:04:27 +08:00
shared-file-link-operation.h [FIX]【共享文件】共享文件夹增加右键发送桌面快捷方式且重启后不会消失 [LINK]80310 2022-11-25 16:04:27 +08:00
xatom-helper.cpp Import Upstream version 3.14.4.5 2022-06-06 11:37:01 +08:00
xatom-helper.h Import Upstream version 3.14.4.5 2022-06-06 11:37:01 +08:00

README.md

FileOperation

Brief

FileOperation is an QRunnable based interface of several file operation. Such as move, copy, delete, rename, and so on.

Desgin Concept

  • Every operation is atomic. That means if you cancelled the operation, it should rollback to the previous states when you didn't execute the operation.
  • The operation can not handle error itself. When a error ocurred, it will send the signal for an error handler instance, and block itself until the handler's slot return the response type. The simplest handler should ignore all the error, even though the operation might not success.
  • The error handler is variable. It could have a UI, or just running in backend.
  • There should be a operation manager to manager the operations' stack for operation undo or redo.

Implement example -- FileMoveOperation

FileMoveOperatoin is dervied from FileOperation. It is an synchronous and cancellable operation. There are two types internal move operation provieded by the class, the native move and the fallback move.

The native move is very fast, but it might not be support in many cases, such as move from different computer. The fallback move is actually a copy and delete operation of files. It might spend a lot of times for a large file directory's movement.

FileOperationProgressWizard

FileOperationProgressWizard is used to indicate the progress of a FileOperation instance. Cause the operation running in thread, wizard should connect the providing signal of FileOperation and then it will handle the sending signal internally.