X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fclient%2Ftreemodel.cpp;h=b2f61f566b2615c209ef97d26843ffd7ae446c32;hp=f599803d7dc93e7810170b01e4c875d9d2ba864d;hb=78decd5f8d1a149fc0e62e01bd6b2886e0feadfe;hpb=921e54680da16fcf2adb7a90506875aceb6633a4 diff --git a/src/client/treemodel.cpp b/src/client/treemodel.cpp index f599803d..b2f61f56 100644 --- a/src/client/treemodel.cpp +++ b/src/client/treemodel.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2015 by the Quassel Project * + * Copyright (C) 2005-2016 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * @@ -105,7 +105,7 @@ void AbstractTreeItem::removeAllChilds() child = *childIter; child->setTreeItemFlags(0); // disable self deletion, as this would only fuck up consitency and the child gets deleted anyways child->removeAllChilds(); - childIter++; + ++childIter; } emit beginRemoveChilds(0, numChilds - 1); @@ -220,7 +220,7 @@ void AbstractTreeItem::dumpChildList() while (childIter != _childItems.constEnd()) { child = *childIter; qDebug() << "Row:" << child->row() << child << child->data(0, Qt::DisplayRole); - childIter++; + ++childIter; } } qDebug() << "==== End Of Childlist ===="; @@ -556,10 +556,9 @@ void TreeModel::endAppendChilds() ChildStatus cs = _childStatus; #ifndef QT_NO_DEBUG QModelIndex parent = indexByItem(parentItem); -#endif Q_ASSERT(cs.parent == parent); Q_ASSERT(rowCount(parent) == cs.childCount + cs.end - cs.start + 1); - +#endif _aboutToRemoveOrInsert = false; for (int i = cs.start; i <= cs.end; i++) { connectItem(parentItem->child(i)); @@ -605,9 +604,9 @@ void TreeModel::endRemoveChilds() #ifndef QT_NO_DEBUG ChildStatus cs = _childStatus; QModelIndex parent = indexByItem(parentItem); -#endif Q_ASSERT(cs.parent == parent); Q_ASSERT(rowCount(parent) == cs.childCount - cs.end + cs.start - 1); +#endif _aboutToRemoveOrInsert = false; endRemoveRows();