peony/libpeony-qt/file-operation
yangyanwei 80b19c5b1e close-cd #I64KZQ【文件管理器】文件管理器右键属性窗口有两层标题栏,修改复制窗口出现两层标题 2023-07-29 11:32:43 +08:00
..
file-operation-dialog 打开重名框,在切换字体选择后,文本会遮盖 2023-07-28 11:04:23 +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 QProcess尽量使用绝对路径,避免环境变量劫持问题 2023-06-05 16:08:48 +08:00
create-template-operation.h Import Upstream version 3.14.4.5 2022-06-06 11:37:01 +08:00
file-batch-rename-operation.cpp Drop no more need args. 2023-07-28 11:23:33 +08:00
file-batch-rename-operation.h 修改线程暂停接口位置,并且优化暂停机制 2023-07-21 15:47:45 +08:00
file-copy-operation.cpp Fix-udf-180628,DVD-RW、CD-RW光盘追加刻录同名文件夹,文管闪退 2023-07-28 11:27:03 +08:00
file-copy-operation.h Fix-udf-180628,DVD-RW、CD-RW光盘追加刻录同名文件夹,文管闪退 2023-07-28 11:27:03 +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 Task#152997 子 音效播放方式统一替换成使用SDK接口 / 音效播放方式统一替换成使用SDK接口 2023-07-28 10:20:38 +08:00
file-delete-operation.h 通过KY_UDF_BURN宏以可选方式合入udf刻录新需求18331 2023-03-29 14:36:57 +08:00
file-link-operation.cpp Task#152997 子 音效播放方式统一替换成使用SDK接口 / 音效播放方式统一替换成使用SDK接口 2023-07-28 10:20:38 +08:00
file-link-operation.h 通过KY_UDF_BURN宏以可选方式合入udf刻录新需求18331 2023-03-29 14:36:57 +08:00
file-move-operation.cpp Fix-udf-180628,DVD-RW、CD-RW光盘追加刻录同名文件夹,文管闪退 2023-07-28 11:27:03 +08:00
file-move-operation.h Fix-udf-180628,DVD-RW、CD-RW光盘追加刻录同名文件夹,文管闪退 2023-07-28 11:27:03 +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 fix-2303-171608, size为0的文件拷贝进度条为0 2023-06-05 16:08:48 +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] 【回收站】回收站弹窗图标不随图标切换变化 [LINK]162833 2023-03-29 14:36:57 +08:00
file-operation-error-dialog-base.h [FIX] 【回收站】回收站弹窗图标不随图标切换变化 [LINK]162833 2023-03-29 14:36:57 +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 Task#152997 子 音效播放方式统一替换成使用SDK接口 / 音效播放方式统一替换成使用SDK接口 2023-07-28 10:20:38 +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 Task#144488, support cancel rename when change file type. 2023-07-21 15:46:58 +08:00
file-operation-helper.cpp 初始化后判断UDF是否正在工作 2023-05-24 09:30:29 +08:00
file-operation-helper.h add copyright 2023-03-29 14:36:57 +08:00
file-operation-internal-dialog.cpp 补充遗漏的提交 2022-11-25 16:05:20 +08:00
file-operation-internal-dialog.h 补充遗漏的提交 2022-11-25 16:05:20 +08:00
file-operation-manager.cpp Fix-udf-180628,DVD-RW、CD-RW光盘追加刻录同名文件夹,文管闪退 2023-07-28 11:27:03 +08:00
file-operation-manager.h Fix-udf-180628,DVD-RW、CD-RW光盘追加刻录同名文件夹,文管闪退 2023-07-28 11:27:03 +08:00
file-operation-progress-bar.cpp close-cd #I64KZQ【文件管理器】文件管理器右键属性窗口有两层标题栏,修改复制窗口出现两层标题 2023-07-29 11:32:43 +08:00
file-operation-progress-bar.h fix-bug-181394,点击文件操作窗口中的暂停按钮,鼠标悬浮显示不正确 2023-07-28 11:09:13 +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 修改线程暂停接口位置,并且优化暂停机制 2023-07-21 15:47:45 +08:00
file-operation.h Fix-udf-180628,DVD-RW、CD-RW光盘追加刻录同名文件夹,文管闪退 2023-07-28 11:27:03 +08:00
file-operation.pri 批量重命名需求开发 2023-07-21 15:46:58 +08:00
file-rename-operation.cpp Drop no more need args. 2023-07-28 11:23:33 +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 Fix trash file not supported case message. 2023-07-21 15:49:13 +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 [FIX]【平板】【需求17365】【主题设置】回收站还原按钮无音效[LINK]bug#146293 2022-11-25 16:05:19 +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-bug-181764,在共享文件夹重复发送快捷方式到桌面,桌面会闪一下发送的文件 2023-07-28 11:15:44 +08:00
shared-file-link-operation.h 补充遗漏的提交 2022-11-25 16:05:20 +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.