Skip to content

Commit 1210222

Browse files
committed
fix: correct icon image update logic
1. Changed from direct init() call to maybeUpdateUrl() when name is set 2. This ensures proper URL update handling when the icon name changes 3. Fixes potential cases where icon wouldn't update correctly after name change 4. Maintains consistency with the component's update behavior fix: 修正图标图片更新逻辑 1. 将直接调用 init() 改为调用 maybeUpdateUrl() 当名称被设置时 2. 确保当图标名称改变时能正确处理URL更新 3. 修复了名称改变后图标可能无法正确更新的情况 4. 保持与组件更新行为的一致性 pms: BUG-311021
1 parent 949dfb9 commit 1210222

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/private/dquickiconimage.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ void DQuickIconImage::setName(const QString &name)
226226
}
227227

228228
if (isComponentComplete()) {
229-
d->init();
229+
d->maybeUpdateUrl();
230230
}
231231
}
232232

0 commit comments

Comments
 (0)