Delete deviceinfo using parent object

This commit is contained in:
Jonas Kvinge 2020-09-02 19:35:13 +02:00
parent 6de0399807
commit ebab9b7e4a

View File

@ -256,7 +256,7 @@ void DeviceManager::AddDeviceFromDB(DeviceInfo *info) {
existing->icon_ = info->icon_; existing->icon_ = info->icon_;
QModelIndex idx = ItemToIndex(existing); QModelIndex idx = ItemToIndex(existing);
if (idx.isValid()) emit dataChanged(idx, idx); if (idx.isValid()) emit dataChanged(idx, idx);
delete info; root_->Delete(info->row);
} }
else { else {
qLog(Info) << "Device added from database: " << info->friendly_name_; qLog(Info) << "Device added from database: " << info->friendly_name_;