Replace deprecated QModelIndex::child with QAbstractItemModel::index
[quassel.git] / src / client / buffermodel.cpp
index d4a94ea..0836b06 100644 (file)
@@ -138,7 +138,7 @@ void BufferModel::newBuffers(const QModelIndex& parent, int start, int end)
         return;
 
     for (int row = start; row <= end; row++) {
-        QModelIndex child = parent.child(row, 0);
+        QModelIndex child = parent.model()->index(row, 0, parent);
         newBuffer(child.data(NetworkModel::BufferIdRole).value<BufferId>());
     }
 }