fix: add QML annotations to eliminate compilation warnings#1242
Merged
Conversation
Added QML_ELEMENT and QML_UNCREATABLE macros to PluginSurface and PluginPopup classes to resolve QString::arg compilation warnings. These annotations explicitly declare the QML element registration and prevent QML instantiation, ensuring proper type registration and eliminating the missing argument warnings during compilation. Log: Fixed compilation warnings related to QML type registration Influence: 1. Verify that the dock plugin compiles without warnings 2. Test that PluginSurface and PluginPopup classes still function correctly in C++ context 3. Confirm that QML cannot instantiate these classes as intended 4. Check that all existing dock functionality remains unaffected fix: 添加QML注解消除编译警告 为PluginSurface和PluginPopup类添加QML_ELEMENT和QML_UNCREATABLE宏,解决 QString::arg编译警告。这些注解显式声明QML元素注册并防止QML实例化,确保正 确的类型注册并消除编译时的参数缺失警告。 Log: 修复了与QML类型注册相关的编译警告 Influence: 1. 验证dock插件编译时无警告 2. 测试PluginSurface和PluginPopup类在C++上下文中仍能正常工作 3. 确认QML无法实例化这些类(符合设计意图) 4. 检查所有现有dock功能不受影响
deepin pr auto review我对这段代码进行审查,主要关注语法逻辑、代码质量、性能和安全性等方面: 语法逻辑
代码质量
改进建议
性能考虑
安全性
其他建议
总体而言,这段代码结构清晰,添加的QML元信息提高了代码的可用性。通过实施上述建议,可以进一步提高代码的健壮性、可维护性和性能。 |
wjyrich
approved these changes
Sep 5, 2025
mhduiy
approved these changes
Sep 5, 2025
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: 18202781743, mhduiy, wjyrich 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 |
Contributor
Author
|
/forcemerge |
|
This pr force merged! (status: blocked) |
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.
Added QML_ELEMENT and QML_UNCREATABLE macros to PluginSurface and
PluginPopup classes to resolve QString::arg compilation warnings. These
annotations explicitly declare the QML element registration and prevent
QML instantiation, ensuring proper type registration and eliminating the
missing argument warnings during compilation.
Log: Fixed compilation warnings related to QML type registration
Influence:
correctly in C++ context
fix: 添加QML注解消除编译警告
为PluginSurface和PluginPopup类添加QML_ELEMENT和QML_UNCREATABLE宏,解决
QString::arg编译警告。这些注解显式声明QML元素注册并防止QML实例化,确保正
确的类型注册并消除编译时的参数缺失警告。
Log: 修复了与QML类型注册相关的编译警告
Influence:
Summary by Sourcery
Add QML annotations to PluginSurface and PluginPopup classes to resolve compilation warnings and enforce non-creatable QML elements
Bug Fixes:
Enhancements: