Properly iterate over devices
This commit is contained in:
parent
6aa41a6ab9
commit
7b87af16df
1 changed files with 1 additions and 2 deletions
|
@ -61,9 +61,8 @@ int main(int argc, char** argv)
|
|||
systray.setVisible(true);
|
||||
|
||||
QObject::connect(&model, &DevicesModel::rowsInserted, &model, [&menu, &model](const QModelIndex& /*parent*/, int first, int last) {
|
||||
qDebug() << "wooooo" << first << last;
|
||||
for (int i=first; i<=last; ++i) {
|
||||
DeviceDbusInterface* device = model.getDevice(first);
|
||||
DeviceDbusInterface* device = model.getDevice(i);
|
||||
auto indicator = new DeviceIndicator(device);
|
||||
QObject::connect(device, &DeviceDbusInterface::destroyed, indicator, &QObject::deleteLater);
|
||||
|
||||
|
|
Loading…
Reference in a new issue