Commit 128995b2 authored by Christian Stenger's avatar Christian Stenger
Browse files

Fix potential crash

There's no need to call beginXYZ() or endXYZ() on our own as this
is done by TreeModel.

Change-Id: I647f280a45c5f3ebb191a8e945c423eed22d677c
Reviewed-by: default avatarNiels Weber <>
Reviewed-by: default avatarDavid Schulz <>
parent 33d1a8c3
......@@ -631,14 +631,10 @@ void TestTreeModel::processChildren(QModelIndex &parentIndex, const TestTreeItem
// handle data tags - just remove old and add them
if (modifiedChild->childCount() || toBeModifiedChild->childCount()) {
beginRemoveRows(child, 0, toBeModifiedChild->childCount());
const int count = modifiedChild->childCount();
beginInsertRows(child, 0, count);
for (int childRow = 0; childRow < count; ++childRow)
toBeModifiedChild->appendChild(new TestTreeItem(*modifiedChild->childItem(childRow)));
if (checkStates.contains(toBeModifiedChild->name())) {
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment