Fix issue spotted by modeltest

Off by 1 index... :(
This commit is contained in:
Aleix Pol 2015-03-14 03:32:53 +01:00
parent a4ccc93518
commit e592081094

View file

@ -127,7 +127,7 @@ void DevicesModel::receivedDeviceList(QDBusPendingCallWatcher* watcher)
Q_ASSERT(m_deviceList.isEmpty());
const QStringList deviceIds = pendingDeviceIds.value();
beginInsertRows(QModelIndex(), 0, deviceIds.count());
beginInsertRows(QModelIndex(), 0, deviceIds.count()-1);
Q_FOREACH(const QString& id, deviceIds) {
m_deviceList.append(new DeviceDbusInterface(id, this));
}