Ensure the watcher never leaks
This commit is contained in:
parent
9c45c5469c
commit
fb9143a2aa
1 changed files with 1 additions and 1 deletions
|
@ -136,6 +136,7 @@ void DevicesModel::refreshDeviceList()
|
|||
|
||||
void DevicesModel::receivedDeviceList(QDBusPendingCallWatcher* watcher)
|
||||
{
|
||||
watcher->deleteLater();
|
||||
clearDevices();
|
||||
QDBusPendingReply<QStringList> pendingDeviceIds = *watcher;
|
||||
if (pendingDeviceIds.isError()) {
|
||||
|
@ -150,7 +151,6 @@ void DevicesModel::receivedDeviceList(QDBusPendingCallWatcher* watcher)
|
|||
m_deviceList.append(new DeviceDbusInterface(id, this));
|
||||
}
|
||||
endInsertRows();
|
||||
watcher->deleteLater();
|
||||
}
|
||||
|
||||
void DevicesModel::clearDevices()
|
||||
|
|
Loading…
Reference in a new issue