fix: 修改桌面快捷方式时拔出hdmi崩溃

This commit is contained in:
yangjianhao 2024-02-22 12:05:16 +08:00
parent 065414fd0a
commit 6a4b4798c5
1 changed files with 4 additions and 1 deletions

View File

@ -471,9 +471,12 @@ QWidget *DesktopIconViewDelegate::createEditor(QWidget *parent, const QStyleOpti
getView()->setEditFlag(true);
connect(edit, &IconViewEditor::returnPressed, this, &DesktopIconViewDelegate::slot_finishEdit);
connect(edit, &IconViewEditor::destroyed, getView(), [=](){
auto editDestroyConn = connect(edit, &IconViewEditor::destroyed, getView(), [=](){
getView()->setEditFlag(false);
});
connect(getView(), &DesktopIconView::destroyed, edit, [=](){
disconnect(editDestroyConn);
});
return edit;
}