[1292] 采用 QML 对话框重构增加宏包弹窗并增加存在性校验 - #4534
Merged
Merged
Conversation
Co-Authored-By: Claude <noreply@anthropic.com>
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.
What
DialogShell+InputField+DialogButtons+run_qml_dialog)重构「增加宏包 → 其他宏包」弹窗,替换旧的(interactive add-style-package)C++ 遗留对话框。(open-add-package-dialog)统一入口,解构返回值并调用(add-style-package pack)。document-menu.scm中焦点菜单、焦点图标栏及文档菜单三处调用点。kv_map_to_tree消除四处 QVariantMap→tree 拷贝循环,去除冗余with绑定与无消费者的isComposing属性。Why
(interactive add-style-package)依赖 C++ 遗留的qt_inputs_list_widget_rep对话框,风格陈旧且无法适配现代 UI 主题。How
AddPackage.qml基于DialogShell和InputField构建,提供宏包名称输入、回车提交及 Esc 取消。cpp_add_package_dialog通过run_qml_dialog启动模态对话框,注入已翻译文案,并提供MOGAN_TEST_ADD_PACKAGE测试钩子。open-add-package-dialog验证包名非空后调package-exists?检测存在性;存在则add-style-package,不存在则cpp-confirm-question弹窗告知。测试
xmake b qml_load_test && xmake r qml_load_test:22/22 通过(含新增test_add_package_loads)xmake b stem && xmake r 1292:11/11 checks 通过任务文档:
devel/1292.md🤖 Generated with Claude Code