Commit b991442
committed
fix: add QML annotations to eliminate compilation warnings
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功能不受影响1 parent 79236ae commit b991442
1 file changed
Lines changed: 4 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
133 | 133 | | |
134 | 134 | | |
135 | 135 | | |
| 136 | + | |
| 137 | + | |
136 | 138 | | |
137 | 139 | | |
138 | 140 | | |
| |||
217 | 219 | | |
218 | 220 | | |
219 | 221 | | |
| 222 | + | |
| 223 | + | |
220 | 224 | | |
221 | 225 | | |
222 | 226 | | |
| |||
0 commit comments