projects
/
quassel.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Replace deprecated QModelIndex::child with QAbstractItemModel::index
[quassel.git]
/
src
/
client
/
networkmodel.cpp
diff --git
a/src/client/networkmodel.cpp
b/src/client/networkmodel.cpp
index
4713932
..
837601f
100644
(file)
--- a/
src/client/networkmodel.cpp
+++ b/
src/client/networkmodel.cpp
@@
-1520,7
+1520,7
@@
void NetworkModel::checkForRemovedBuffers(const QModelIndex& parent, int start,
return;
for (int row = start; row <= end; row++) {
return;
for (int row = start; row <= end; row++) {
- _bufferItemCache.remove(
parent.child(row, 0
).data(BufferIdRole).value<BufferId>());
+ _bufferItemCache.remove(
index(row, 0, parent
).data(BufferIdRole).value<BufferId>());
}
}
}
}
@@
-1530,7
+1530,7
@@
void NetworkModel::checkForNewBuffers(const QModelIndex& parent, int start, int
return;
for (int row = start; row <= end; row++) {
return;
for (int row = start; row <= end; row++) {
- QModelIndex child = parent.
child(row, 0
);
+ QModelIndex child = parent.
model()->index(row, 0, parent
);
_bufferItemCache[child.data(BufferIdRole).value<BufferId>()] = static_cast<BufferItem*>(child.internalPointer());
}
}
_bufferItemCache[child.data(BufferIdRole).value<BufferId>()] = static_cast<BufferItem*>(child.internalPointer());
}
}