devicecontrol.cpp   devicecontrol.cpp 
skipping to change at line 289 skipping to change at line 289
m_actions.remove(udi); m_actions.remove(udi);
QModelIndex index = DeviceControl::index(position); QModelIndex index = DeviceControl::index(position);
Q_EMIT dataChanged(index, index, {Actions}); Q_EMIT dataChanged(index, index, {Actions});
// remove space monitoring because device not mounted // remove space monitoring because device not mounted
m_spaceMonitor->removeMonitoringDevice(udi); m_spaceMonitor->removeMonitoringDevice(udi);
for (auto it = m_parentDevices.begin(); it != m_parentDevices.e nd(); ++it) { for (auto it = m_parentDevices.begin(); it != m_parentDevices.e nd(); ++it) {
for (int position = 0; position < it->size(); ++position) { for (int position = 0; position < it->size(); ++position) {
if (udi == it->at(position).udi()) { if (udi == it->at(position).udi()) {
const QString &parentUdi = it.key(); std::function<void()> slot = [this, udi, parentUdi
std::function<void()> slot = [this, udi, parentUdi] = it.key()]() {
() {
qCDebug(APPLETS::DEVICENOTIFIER) << "Device Con troller: Timer activated for " << udi; qCDebug(APPLETS::DEVICENOTIFIER) << "Device Con troller: Timer activated for " << udi;
for (int position = 0; position < m_devices.siz e(); ++position) { for (int position = 0; position < m_devices.siz e(); ++position) {
if (m_devices[position].udi() == udi) { if (m_devices[position].udi() == udi) {
deviceDelayRemove(udi, parentUdi); deviceDelayRemove(udi, parentUdi);
break; break;
} }
} }
}; };
auto timer = new QTimer(this); auto timer = new QTimer(this);
timer->setSingleShot(true); timer->setSingleShot(true);
skipping to change at line 350 skipping to change at line 349
} }
break; break;
} }
} }
} }
} }
for (int position = 0; position < m_devices.size(); ++position) { for (int position = 0; position < m_devices.size(); ++position) {
if (m_devices[position].udi() == udi) { if (m_devices[position].udi() == udi) {
beginRemoveRows(QModelIndex(), position, position); beginRemoveRows(QModelIndex(), position, position);
if (auto it = m_deviceTypes.find(udi); it != m_deviceTypes.end( m_deviceTypes.remove(udi);
)) {
m_deviceTypes.remove(m_devices[position].udi());
}
m_stateMonitor->removeMonitoringDevice(m_devices[position].udi( )); m_stateMonitor->removeMonitoringDevice(m_devices[position].udi( ));
m_errorMonitor->removeMonitoringDevice(m_devices[position].udi( )); m_errorMonitor->removeMonitoringDevice(m_devices[position].udi( ));
qCDebug(APPLETS::DEVICENOTIFIER) << "Device Controller: device: " << m_devices[position].udi() << " successfully removed from the model"; qCDebug(APPLETS::DEVICENOTIFIER) << "Device Controller: device: " << m_devices[position].udi() << " successfully removed from the model";
m_devices.removeAt(position); m_devices.removeAt(position);
endRemoveRows(); endRemoveRows();
break; break;
} }
} }
 End of changes. 2 change blocks. 
7 lines changed or deleted 3 lines changed or added

This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/