summaryrefslogtreecommitdiffstats
path: root/doc/src/snippets/code
diff options
context:
space:
mode:
authorMorten Engvoldsen <morten.engvoldsen@nokia.com>2009-05-15 09:43:09 (GMT)
committerMorten Engvoldsen <morten.engvoldsen@nokia.com>2009-05-15 09:43:24 (GMT)
commit9c3f5040bc9b80619ebe167c352ac8f0394f9b41 (patch)
tree070f0c0a315afcbe088402799886366c31308022 /doc/src/snippets/code
parentad679a7993042f1df8da8c2d90d325be3cf0113d (diff)
downloadQt-9c3f5040bc9b80619ebe167c352ac8f0394f9b41.zip
Qt-9c3f5040bc9b80619ebe167c352ac8f0394f9b41.tar.gz
Qt-9c3f5040bc9b80619ebe167c352ac8f0394f9b41.tar.bz2
Cleaning bug in custom layout example.
The example was using deleteAllItems() to delete items from the layout. This method is now part of the QT3_SUPPORT and shold not be used if not needed. Replaced by deleting all items one by one. Task-number: 220656 Rev-by: janarve
Diffstat (limited to 'doc/src/snippets/code')
-rw-r--r--doc/src/snippets/code/doc_src_layout.qdoc6
1 files changed, 4 insertions, 2 deletions
diff --git a/doc/src/snippets/code/doc_src_layout.qdoc b/doc/src/snippets/code/doc_src_layout.qdoc
index fedcf0c..60f36b0 100644
--- a/doc/src/snippets/code/doc_src_layout.qdoc
+++ b/doc/src/snippets/code/doc_src_layout.qdoc
@@ -67,7 +67,9 @@ void CardLayout::addItem(QLayoutItem *item)
//! [5]
CardLayout::~CardLayout()
{
- deleteAllItems();
+ QLayoutItem *item;
+ while ((item = takeAt(0)))
+ delete item;
}
//! [5]
@@ -121,4 +123,4 @@ QSize CardLayout::minimumSize() const
}
return s + n*QSize(spacing(), spacing());
}
-//! [7] \ No newline at end of file
+//! [7]