From 68150b4c36924c667f1431438d98a8f0ce9075b9 Mon Sep 17 00:00:00 2001 From: zhaoshixu Date: Wed, 19 Oct 2022 13:45:49 +0800 Subject: [PATCH] fix segament fault --- src/frontend/netdetails/multiplednswidget.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/frontend/netdetails/multiplednswidget.cpp b/src/frontend/netdetails/multiplednswidget.cpp index 8bbf3e1a..55aca598 100644 --- a/src/frontend/netdetails/multiplednswidget.cpp +++ b/src/frontend/netdetails/multiplednswidget.cpp @@ -84,6 +84,10 @@ void MultipleDnsWidget::initComponent() connect(m_dnsListWidget, &QListWidget::itemDoubleClicked, this, [=](QListWidgetItem *item) { m_dnsListWidget->edit(m_dnsListWidget->currentIndex()); item->setFlags(item->flags() | Qt::ItemIsEditable); + ListItemEdit *dnsListItemEdit = new ListItemEdit(m_regExp); + m_dnsListWidget ->setItemDelegateForRow(m_dnsListWidget->currentIndex().row(), dnsListItemEdit); + connect(dnsListItemEdit, SIGNAL(textChanged(QString)), this, SIGNAL(dnsTextChanged(QString))); + connect(dnsListItemEdit, SIGNAL(editingFinished()), this, SIGNAL(dnsEditingFinished())); }); }