-
Notifications
You must be signed in to change notification settings - Fork 55
Revert "feat: add trash file drop support" #1313
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
This reverts commit 83021e8. 文管采用了相关脚本处理,无需dde-shell特殊处理回收站,只需保持原有逻辑。
Reviewer's guide (collapsed on small PRs)Reviewer's GuideReverts the custom “drop to trash” implementation in TaskManager by removing related includes, method, and conditional branch, restoring the original dropFilesOnItem flow. Sequence diagram for file drop on dock item after trash support removalsequenceDiagram
participant User as actor
participant TaskManager
participant ItemModel
User->>TaskManager: dropFilesOnItem(itemId, urls)
TaskManager->>ItemModel: match(index, ItemIdRole, itemId)
alt Item found
TaskManager->>ItemModel: requestOpenUrls(index, urlList)
else Item not found
TaskManager-->>User: (no action)
end
Class diagram for TaskManager after removing trash file drop supportclassDiagram
class TaskManager {
+void handleWindowAdded(QPointer<AbstractWindow> window)
+void dropFilesOnItem(const QString& itemId, const QStringList& urls)
+void hideItemPreview()
+void saveDockElementsOrder(const QStringList &appIds)
+QString getTrashTipText()
// Removed: void moveFilesToTrash(const QStringList& urls)
}
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
deepin pr auto review我来对这段代码进行审查和分析:
优点:
潜在问题:
void TaskManager::dropFilesOnItem(const QString& itemId, const QStringList& urls)
{
if (itemId == "dde-trash") {
// 添加错误处理和用户反馈
if (!moveFilesToTrash(urls)) {
Q_EMIT showError(tr("Failed to move files to trash"));
}
return;
}
// ... 其他代码保持不变
}
建议在后续版本中考虑是否需要重新实现回收站功能,如果需要,可以采用更安全和高效的方式实现。 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: 18202781743, wjyrich The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
This reverts commit 83021e8.
文管采用了相关脚本处理,无需dde-shell特殊处理回收站,只需保持原有逻辑。
Summary by Sourcery
Revert the addition of trash file drop support in the TaskManager and restore original file drop behavior.
Enhancements: