-
Notifications
You must be signed in to change notification settings - Fork 180
Revert "fix: Copying files from cloud desktop cannot be copied to the… #2916
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
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
suggestion: Incrementing QAtomicInt with ++ may not convey memory ordering
Prefer using an explicit atomic method such as
fetchAndAddRelaxed(1)to make memory ordering intentions clear.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.
revert不对原逻辑改动
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.
这条建议只是从“风格和可读性”角度来提:
QAtomicInt 的 “++” 操作确实会原子加一,但它的内存顺序语义是隐含的。为了让代码读起来更直观,也更明确地表达“这里不需要强制的 acquire/release,仅仅是一个放宽版的原子加一”,我们才推荐把
改成
remoteCurrentCount.fetchAndAddRelaxed(1);两者在功能上是一致的,不会改变现有逻辑。如果你觉得“++”已经足够且更简洁,也完全可以保留,PR 的 revert 本身也不影响这部分行为。只是为了后续维护时一看就知道“这是个 relax(宽松)模式的原子加一”,才建议显式调用
fetchAndAddRelaxed。