Changeset View
Changeset View
Standalone View
Standalone View
interfaces/devicesmodel.cpp
Show First 20 Lines • Show All 197 Lines • ▼ Show 20 Line(s) | 190 | { | |||
---|---|---|---|---|---|
198 | 198 | | |||
199 | Q_ASSERT(m_deviceList.isEmpty()); | 199 | Q_ASSERT(m_deviceList.isEmpty()); | ||
200 | const QStringList deviceIds = pendingDeviceIds.value(); | 200 | const QStringList deviceIds = pendingDeviceIds.value(); | ||
201 | 201 | | |||
202 | if (deviceIds.isEmpty()) | 202 | if (deviceIds.isEmpty()) | ||
203 | return; | 203 | return; | ||
204 | 204 | | |||
205 | beginInsertRows(QModelIndex(), 0, deviceIds.count()-1); | 205 | beginInsertRows(QModelIndex(), 0, deviceIds.count()-1); | ||
206 | Q_FOREACH(const QString& id, deviceIds) { | 206 | for (const QString& id : deviceIds) { | ||
207 | appendDevice(new DeviceDbusInterface(id, this)); | 207 | appendDevice(new DeviceDbusInterface(id, this)); | ||
208 | } | 208 | } | ||
209 | endInsertRows(); | 209 | endInsertRows(); | ||
210 | } | 210 | } | ||
211 | 211 | | |||
212 | void DevicesModel::appendDevice(DeviceDbusInterface* dev) | 212 | void DevicesModel::appendDevice(DeviceDbusInterface* dev) | ||
213 | { | 213 | { | ||
214 | m_deviceList.append(dev); | 214 | m_deviceList.append(dev); | ||
▲ Show 20 Lines • Show All 100 Lines • Show Last 20 Lines |