fix: Failed to save the new file#162
fix: Failed to save the new file#162lzwind merged 2 commits intolinuxdeepin:develop/snipefrom Kakueeen:develop/snipe
Conversation
Implemented checkAndBuildPath and extractSuffix methods to ensure selected file paths are valid and to append the appropriate suffix based on the selected name filter. Updated the file selection logic to utilize these new methods for improved user experience. Log: fix bug Bug: https://pms.uniontech.com/bug-view-322283.html
Reviewer's GuideThis PR introduces helper methods to validate and append missing file suffixes based on the selected name filter, and integrates these methods into the file selection logic for more robust path handling. Sequence diagram for file selection and path validationsequenceDiagram
actor User
participant FileSelectDialog
participant FileHander
User->>FileSelectDialog: Select file and confirm
FileSelectDialog->>FileSelectDialog: checkAndBuildPath(selectedFile)
FileSelectDialog->>FileSelectDialog: extractSuffix(selectedNameFilter)
FileSelectDialog->>FileHander: isLegalFile(path)
FileHander-->>FileSelectDialog: result
FileSelectDialog-->>User: Proceed or show warning
Class diagram for updated FileSelectDialog methodsclassDiagram
class FileSelectDialog {
+QString checkAndBuildPath(const QString &path)
+QString extractSuffix(const QString &filter)
-void saveSetting()
-QString _resultFile
}
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
|
TAG Bot TAG: 6.5.21 |
update version Log: update version
deepin pr auto review代码审查意见:
|
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: Kakueeen, lzwind 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 |
Implemented checkAndBuildPath and extractSuffix methods to ensure selected file paths are valid and to append the appropriate suffix based on the selected name filter. Updated the file selection logic to utilize these new methods for improved user experience.
Log: fix bug
Bug: https://pms.uniontech.com/bug-view-322283.html
Summary by Sourcery
Ensure valid file paths by automatically appending the appropriate extension based on the selected name filter during file selection.
Bug Fixes:
Enhancements: