summaryrefslogtreecommitdiffstats
path: root/tests/manual/qlayout/gridwidget.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/manual/qlayout/gridwidget.cpp')
-rw-r--r--tests/manual/qlayout/gridwidget.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/manual/qlayout/gridwidget.cpp b/tests/manual/qlayout/gridwidget.cpp
index 31f0094182..6d7de3c763 100644
--- a/tests/manual/qlayout/gridwidget.cpp
+++ b/tests/manual/qlayout/gridwidget.cpp
@@ -53,6 +53,7 @@ GridWidget::GridWidget(QWidget *parent) :
QWidget(parent)
{
QGridLayout *hb = new QGridLayout(this);
+ hb->setObjectName("GridWidget");
QComboBox *combo = new QComboBox();
combo->addItem("123");
QComboBox *combo2 = new QComboBox();
@@ -71,4 +72,11 @@ GridWidget::GridWidget(QWidget *parent) :
hb->addWidget(new QPushButton("123"), 1, 4);
hb->addWidget(new QSpinBox(), 0, 5);
hb->addWidget(new QSpinBox(), 1, 5);
+
+ qDebug("There should be four warnings, but no crash or freeze:");
+ hb->addWidget(this, 6, 6); ///< This command should print a warning, but should not add "this"
+ hb->addWidget(Q_NULLPTR, 6, 7); ///< This command should print a warning, but should not add "NULL"
+ hb->addLayout(hb, 7, 6); ///< This command should print a warning, but should not add "hb"
+ hb->addLayout(Q_NULLPTR, 7, 7); ///< This command should print a warning, but should not add "NULL"
+ qDebug("Neither crashed nor frozen");
}