diff options
author | Christian Stenger <christian.stenger@theqtcompany.com> | 2015-10-29 10:14:35 +0100 |
---|---|---|
committer | Christian Stenger <christian.stenger@theqtcompany.com> | 2015-11-03 10:12:27 +0000 |
commit | 128995b272998e998fc8c1aacc8e4a1449bd4ac8 (patch) | |
tree | e01cae5931348ac89ac92defd0112b14bc171bdd | |
parent | 33d1a8c3075712b9fac34a70ba136a012686a6fa (diff) |
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: Niels Weber <niels.weber@theqtcompany.com>
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
-rw-r--r-- | plugins/autotest/testtreemodel.cpp | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/plugins/autotest/testtreemodel.cpp b/plugins/autotest/testtreemodel.cpp index 2f7366b379..49e28c3ba3 100644 --- a/plugins/autotest/testtreemodel.cpp +++ b/plugins/autotest/testtreemodel.cpp @@ -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()); toBeModifiedChild->removeChildren(); - endRemoveRows(); const int count = modifiedChild->childCount(); - beginInsertRows(child, 0, count); for (int childRow = 0; childRow < count; ++childRow) toBeModifiedChild->appendChild(new TestTreeItem(*modifiedChild->childItem(childRow))); - endInsertRows(); } if (checkStates.contains(toBeModifiedChild->name())) { |