summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorChristian Ehrlicher <ch.ehrlicher@gmx.de>2018-08-30 20:08:12 +0200
committerChristian Ehrlicher <ch.ehrlicher@gmx.de>2018-09-09 12:03:51 +0000
commitcd499b72973a4a01d12e2e3ba66e7e16ac1feeb4 (patch)
treeb08c910e56eaeafba3fda35e1e796249c2233f03 /src
parent8b3a6cfbfb21a71b8efc2e3a91006712238db6fe (diff)
QLayout: Better document QLayout(QWidget *parent) behavior
QLayout(QWidget *parent) directly calls parent->setLayout(this) which can lead to a runtime warning later on when someone tries to set the layout on the parent again. Task-number: QTBUG-69761 Change-Id: I21ef8895fd65f3e23e57527a6d38936e45417b63 Reviewed-by: Paul Wicking <paul.wicking@qt.io> Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
Diffstat (limited to 'src')
-rw-r--r--src/widgets/kernel/qlayout.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/widgets/kernel/qlayout.cpp b/src/widgets/kernel/qlayout.cpp
index 80ea27fee8..eac5674161 100644
--- a/src/widgets/kernel/qlayout.cpp
+++ b/src/widgets/kernel/qlayout.cpp
@@ -109,10 +109,11 @@ static int menuBarHeightForWidth(QWidget *menubar, int w)
/*!
Constructs a new top-level QLayout, with parent \a parent.
- \a parent may not be 0.
+ \a parent may not be a \c nullptr.
- There can be only one top-level layout for a widget. It is
- returned by QWidget::layout().
+ The layout is set directly as the top-level layout for
+ \a parent. There can be only one top-level layout for a
+ widget. It is returned by QWidget::layout().
*/
QLayout::QLayout(QWidget *parent)
: QObject(*new QLayoutPrivate, parent)