fix: add missing right bracket#520
Conversation
Signed-off-by: ComixHe <ComixHe1895@outlook.com>
Synchronize source files from linuxdeepin/dtkdeclarative. Source-pull-request: linuxdeepin/dtkdeclarative#520
|
CLA Assistant Lite bot: You can retrigger this bot by commenting recheck in this Pull Request |
deepin pr auto review这段代码是一个简单的语法修复,我来详细分析一下:
改进建议: void DAppLoaderPrivate::_q_onComponentProgressChanged()
{
qreal progress = 0;
auto components = appRootItem->findChildren<QQmlComponent *>();
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
for (auto childCom : std::as_const(components)) {
if (!childCom) continue; // 添加空指针检查
// 其他处理逻辑...
#else
for (auto childCom : qAsConst(components)) {
if (!childCom) continue; // 添加空指针检查
// 其他处理逻辑...
#endif
}
}改进说明:
这样的修改既修复了语法错误,又提高了代码的健壮性,同时保持了原有的性能优化。 |
Reviewer's guide (collapsed on small PRs)Reviewer's GuideFixed a syntax error in _q_onComponentProgressChanged by adding the missing closing parenthesis in the loop over QQmlComponent pointers. File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: 18202781743, ComixHe 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 |
Synchronize source files from linuxdeepin/dtkdeclarative. Source-pull-request: linuxdeepin/dtkdeclarative#520
Summary by Sourcery
Bug Fixes: