diff options
Diffstat (limited to 'tests/manual/qlayout/hbwidget.cpp')
-rw-r--r-- | tests/manual/qlayout/hbwidget.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/manual/qlayout/hbwidget.cpp b/tests/manual/qlayout/hbwidget.cpp index e8bb07f4a4..743b420b0d 100644 --- a/tests/manual/qlayout/hbwidget.cpp +++ b/tests/manual/qlayout/hbwidget.cpp @@ -53,6 +53,7 @@ HbWidget::HbWidget(QWidget *parent) : QWidget(parent) { QHBoxLayout *hb = new QHBoxLayout(this); + hb->setObjectName("HbWidget"); QComboBox *combo = new QComboBox(this); combo->addItem("123"); QComboBox *combo2 = new QComboBox(); @@ -67,4 +68,11 @@ HbWidget::HbWidget(QWidget *parent) : hb->addWidget(new QDateTimeEdit()); hb->addWidget(new QPushButton("123")); hb->addWidget(new QSpinBox()); + + qDebug("There should be four warnings, but no crash or freeze:"); + hb->addWidget(this); ///< This command should print a warning, but should not add "this" + hb->addWidget(Q_NULLPTR); ///< This command should print a warning, but should not add "NULL" + hb->addLayout(hb); ///< This command should print a warning, but should not add "hb" + hb->addLayout(Q_NULLPTR); ///< This command should print a warning, but should not add "NULL" + qDebug("Neither crashed nor frozen"); } |