From ebab9b7e4a00dc6d8f203379e00f9da5b21f55d2 Mon Sep 17 00:00:00 2001 From: Jonas Kvinge Date: Wed, 2 Sep 2020 19:35:13 +0200 Subject: [PATCH] Delete deviceinfo using parent object --- src/device/devicemanager.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/device/devicemanager.cpp b/src/device/devicemanager.cpp index 71721461a..eec1fa425 100644 --- a/src/device/devicemanager.cpp +++ b/src/device/devicemanager.cpp @@ -256,7 +256,7 @@ void DeviceManager::AddDeviceFromDB(DeviceInfo *info) { existing->icon_ = info->icon_; QModelIndex idx = ItemToIndex(existing); if (idx.isValid()) emit dataChanged(idx, idx); - delete info; + root_->Delete(info->row); } else { qLog(Info) << "Device added from database: " << info->friendly_name_;