Repository navigation
[6230] 放宽附件菜单收起高度断言的舍入容差 - #4762
Merged
Merged
Conversation
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.
任务
6230:修复 #4760 合并后 macOS CI 的测试失败(runs/40265514650)。
失败现象
qt_chat_controller_test的test_attach_menu_popup_resizes_when_attached_expanded在 macOS-14 CI 上失败:收起「已添加」后 Popup 高度为 232,与展开前记录的 231 差 1px;本地整数缩放下 41/41 通过。根因
Popup 初始高度来自
popup->adjustSize()(layout sizeHint 的舍入),展开/收起后的高度来自syncPopupSize的qRound(implicitHeight)。当implicitHeight为非整数时(CI 无头环境的缩放),两条尺寸路径的舍入结果可差 1px。属断言过严,不是行为回归。修复
QTRY_VERIFY (qAbs (popup->height () - collapsedHeight) <= 1))。验证
xmake b qt_chat_controller_test && xmake r qt_chat_controller_test:41/41 通过gf fmt --check、git diff --check:通过🤖 Generated with Claude Code