free pointer
This commit is contained in:
parent
22e3fcc575
commit
a7d8d2f28f
|
@ -26,7 +26,7 @@ LanListItem::LanListItem(const KyConnectItem *lanConnectItem,
|
|||
m_itemFrame->installEventFilter(this);
|
||||
connect(this->m_infoButton, &InfoButton::clicked, this, &LanListItem::onInfoButtonClicked);
|
||||
|
||||
m_menu = new QMenu();//右键菜单
|
||||
m_menu = new QMenu(this);//右键菜单
|
||||
connect(m_menu, &QMenu::triggered, this, &LanListItem::onMenuTriggered);
|
||||
}
|
||||
|
||||
|
@ -41,6 +41,11 @@ LanListItem::LanListItem(QWidget *parent) : ListItem(parent)
|
|||
this->m_infoButton->hide();
|
||||
}
|
||||
|
||||
LanListItem::~LanListItem()
|
||||
{
|
||||
qDebug()<<"[LanPage] lan list item is deleted." << m_lanConnectItem.m_connectName;
|
||||
}
|
||||
|
||||
void LanListItem::setIcon(bool isOn)
|
||||
{
|
||||
if (isOn) {
|
||||
|
|
|
@ -16,7 +16,7 @@ public:
|
|||
LanListItem(const KyConnectItem *lanConnectItem, const QString &deviceName, QWidget *parent = nullptr);
|
||||
LanListItem(QWidget *parent = nullptr);
|
||||
|
||||
~LanListItem() = default;
|
||||
~LanListItem();
|
||||
|
||||
public:
|
||||
void updateConnectionState(ConnectState state);
|
||||
|
|
|
@ -18,7 +18,7 @@ WlanListItem::WlanListItem(KyWirelessNetItem &wirelessNetItem, QString device, Q
|
|||
|
||||
connect(this->m_infoButton, &InfoButton::clicked, this, &WlanListItem::onInfoButtonClicked);
|
||||
|
||||
m_menu = new QMenu();//右键菜单
|
||||
m_menu = new QMenu(this);//右键菜单
|
||||
connect(m_menu, &QMenu::triggered, this, &WlanListItem::onMenuTriggered);
|
||||
|
||||
m_wirelessConnectOperation = new KyWirelessConnectOperation(this);
|
||||
|
|
Loading…
Reference in New Issue