path: root/src/widgets/doc/snippets
diff options
authorMitch Curtis <>2012-07-24 15:59:17 +0200
committerQt by Nokia <>2012-07-25 00:58:20 +0200
commit958e4e6bec1905f59dbac392dc48203a0a770558 (patch)
treef62e98a6f73197ddce9b97720d0849bbf6894dd2 /src/widgets/doc/snippets
parent044645ead61de0797945505b9ab8a2d061c9f814 (diff)
Fix error in sample code on the Layout Management page.
Incorrect return type in a sample class (CardLayout) function. Although the function is never called, the return type should be int, not QLayoutItem*. Task-number: QTBUG-25602 Change-Id: I05ebd07a35b6db62b8c12255186f9d9487da79f6 Reviewed-by: Geir Vattekar <>
Diffstat (limited to 'src/widgets/doc/snippets')
1 files changed, 2 insertions, 2 deletions
diff --git a/src/widgets/doc/snippets/code/doc_src_layout.cpp b/src/widgets/doc/snippets/code/doc_src_layout.cpp
index b6abab61d3..fcca5ab830 100644
--- a/src/widgets/doc/snippets/code/doc_src_layout.cpp
+++ b/src/widgets/doc/snippets/code/doc_src_layout.cpp
@@ -56,7 +56,7 @@ public:
void addItem(QLayoutItem *item);
QSize sizeHint() const;
QSize minimumSize() const;
- QLayoutItem *count() const;
+ int count() const;
QLayoutItem *itemAt(int) const;
QLayoutItem *takeAt(int);
void setGeometry(const QRect &rect);
@@ -73,7 +73,7 @@ private:
//! [1]
//! [2]
-QLayoutItem *CardLayout::count() const
+int CardLayout::count() const
// QList::size() returns the number of QLayoutItems in the list
return list.size();