X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fclient%2Fnetworkmodel.cpp;h=837601f653b2b594269a5150237354f443156118;hp=17a9aaa02d400cf54a689ab6380af6fd01701646;hb=a8ab790b2218d6131f12b622b1373ba62958f3ef;hpb=cc6e7c08709c4e761e2fd9c2e322751015497003 diff --git a/src/client/networkmodel.cpp b/src/client/networkmodel.cpp index 17a9aaa0..837601f6 100644 --- 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++) { - _bufferItemCache.remove(parent.child(row, 0).data(BufferIdRole).value()); + _bufferItemCache.remove(index(row, 0, parent).data(BufferIdRole).value()); } } @@ -1530,7 +1530,7 @@ void NetworkModel::checkForNewBuffers(const QModelIndex& parent, int start, int 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()] = static_cast(child.internalPointer()); } } @@ -1605,7 +1605,7 @@ void NetworkModel::sortBufferIds(QList& bufferIds) const bufferItems << _bufferItemCache[bufferId]; } - qSort(bufferItems.begin(), bufferItems.end(), bufferItemLessThan); + std::sort(bufferItems.begin(), bufferItems.end(), bufferItemLessThan); bufferIds.clear(); foreach (BufferItem* bufferItem, bufferItems) {