fix: remove maybe_unused attribute and add Q_UNUSED#276
Merged
18202781743 merged 1 commit intolinuxdeepin:masterfrom Jul 28, 2025
Merged
fix: remove maybe_unused attribute and add Q_UNUSED#27618202781743 merged 1 commit intolinuxdeepin:masterfrom
18202781743 merged 1 commit intolinuxdeepin:masterfrom
Conversation
Removed the [[maybe_unused]] attribute from the QtConcurrent::run result variable and replaced it with Q_UNUSED macro. This change was made because: 1. [[maybe_unused]] is a C++17 feature that might not be supported in all build environments 2. Q_UNUSED is the Qt-specific and more portable way to suppress unused variable warnings 3. Maintains consistency with Qt coding standards 4. The variable is intentionally unused as we're running the task asynchronously without tracking the result fix: 移除 maybe_unused 属性并添加 Q_UNUSED 移除了 QtConcurrent::run 结果变量的 [[maybe_unused]] 属性,改用 Q_UNUSED 宏。此变更的原因是: 1. [[maybe_unused]] 是 C++17 特性,可能在某些构建环境中不受支持 2. Q_UNUSED 是 Qt 特有的更便携的方式来抑制未使用变量警告 3. 保持与 Qt 编码标准的一致性 4. 该变量是故意不使用的,因为我们异步运行任务而不跟踪结果
deepin-ci-robot
added a commit
to linuxdeepin/qt6integration
that referenced
this pull request
Jul 28, 2025
Synchronize source files from linuxdeepin/qt5integration. Source-pull-request: linuxdeepin/qt5integration#276
Contributor
deepin pr auto review关键摘要:
是否建议立即修改:
|
mhduiy
approved these changes
Jul 28, 2025
Contributor
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: 18202781743, mhduiy 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 |
18202781743
pushed a commit
to linuxdeepin/qt6integration
that referenced
this pull request
Jul 28, 2025
Synchronize source files from linuxdeepin/qt5integration. Source-pull-request: linuxdeepin/qt5integration#276
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Removed the [[maybe_unused]] attribute from the QtConcurrent::run result
variable and replaced it with Q_UNUSED macro. This change was made
because:
all build environments
variable warnings
asynchronously without tracking the result
fix: 移除 maybe_unused 属性并添加 Q_UNUSED
移除了 QtConcurrent::run 结果变量的 [[maybe_unused]] 属性,改用 Q_UNUSED
宏。此变更的原因是: