X-Git-Url: https://git.quassel-irc.org/?a=blobdiff_plain;f=src%2Fclient%2Ftreemodel.cpp;h=8d6c8824ae8750d6eeb05bf40e5f014a26d8601b;hb=4ee99e398eab6e96cfc3750a32fcf6c0b87e1f6f;hp=ed8f12b00e6bf023ebe95a755cb811bf341c5367;hpb=c1cf157116de7fc3da96203aa6f03c38c7ebb650;p=quassel.git diff --git a/src/client/treemodel.cpp b/src/client/treemodel.cpp index ed8f12b0..8d6c8824 100644 --- a/src/client/treemodel.cpp +++ b/src/client/treemodel.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2018 by the Quassel Project * + * Copyright (C) 2005-2020 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * @@ -571,7 +571,7 @@ void TreeModel::debug_rowsAboutToBeRemoved(const QModelIndex& parent, int start, QModelIndex child; for (int i = end; i >= start; i--) { - child = parent.child(i, 0); + child = parent.model()->index(i, 0, parent); Q_ASSERT(parentItem->child(i)); qDebug() << ">>>" << i << child << child.data().toString(); } @@ -587,7 +587,7 @@ void TreeModel::debug_rowsInserted(const QModelIndex& parent, int start, int end QModelIndex child; for (int i = start; i <= end; i++) { - child = parent.child(i, 0); + child = parent.model()->index(i, 0, parent); Q_ASSERT(parentItem->child(i)); qDebug() << "<<<" << i << child << child.data().toString(); }