diff options
author | Alexis Menard <alexis.menard@nokia.com> | 2009-05-05 15:56:43 (GMT) |
---|---|---|
committer | Alexis Menard <alexis.menard@nokia.com> | 2009-05-05 15:56:43 (GMT) |
commit | 7d39e871e679be8afc10c7109a5cc396ead886f7 (patch) | |
tree | 810c06e4304ee825f86f2dbd0c1c18077bc7e372 /tests/auto/qgraphicslayout | |
parent | 200afdbd684bc7b6dca96d6fccb59d4cd078a02e (diff) | |
download | Qt-7d39e871e679be8afc10c7109a5cc396ead886f7.zip Qt-7d39e871e679be8afc10c7109a5cc396ead886f7.tar.gz Qt-7d39e871e679be8afc10c7109a5cc396ead886f7.tar.bz2 |
Fix deletion of indexed items, and fix comments.
It was not a good idea to delete all items in the middle of the loop
when clearing the scene since we change the content of indexedItems
by deleting one of them.
We need to store first all top level items in a temporary list
and then delete them in one shot (that will delete their children
as well).
Diffstat (limited to 'tests/auto/qgraphicslayout')
-rw-r--r-- | tests/auto/qgraphicslayout/tst_qgraphicslayout.cpp | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/tests/auto/qgraphicslayout/tst_qgraphicslayout.cpp b/tests/auto/qgraphicslayout/tst_qgraphicslayout.cpp index f2a6bfd..617790c 100644 --- a/tests/auto/qgraphicslayout/tst_qgraphicslayout.cpp +++ b/tests/auto/qgraphicslayout/tst_qgraphicslayout.cpp @@ -687,7 +687,6 @@ void tst_QGraphicsLayout::ownership() delete top; //don't crash after that. } - } QTEST_MAIN(tst_QGraphicsLayout) |