summaryrefslogtreecommitdiffstats
path: root/tests/auto/widgets
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@digia.com>2014-01-03 14:29:41 +0100
committerSimon Hausmann <simon.hausmann@digia.com>2014-01-03 14:30:21 +0100
commitb5ab7ee0d78a30863e3d11bd2ba10ba5f4854bf5 (patch)
treed4ab3471f9f92e153fe320e0435a5740c794746b /tests/auto/widgets
parentad9554a7f2d4b8a2af3efabc7bc69b9a0ae3751d (diff)
parentaff3e3c4a20aae52fdafaede8dfcbde2bc990104 (diff)
Merge remote-tracking branch 'origin/stable' into dev
Diffstat (limited to 'tests/auto/widgets')
-rw-r--r--tests/auto/widgets/kernel/qwidget_window/tst_qwidget_window.cpp30
1 files changed, 30 insertions, 0 deletions
diff --git a/tests/auto/widgets/kernel/qwidget_window/tst_qwidget_window.cpp b/tests/auto/widgets/kernel/qwidget_window/tst_qwidget_window.cpp
index 1bbbfd610e..d6b7fc20ed 100644
--- a/tests/auto/widgets/kernel/qwidget_window/tst_qwidget_window.cpp
+++ b/tests/auto/widgets/kernel/qwidget_window/tst_qwidget_window.cpp
@@ -94,6 +94,8 @@ private slots:
#ifndef QT_NO_DRAGANDDROP
void tst_dnd();
#endif
+
+ void tst_qtbug35600();
};
void tst_QWidget_window::initTestCase()
@@ -568,5 +570,33 @@ void tst_QWidget_window::tst_dnd()
}
#endif
+void tst_QWidget_window::tst_qtbug35600()
+{
+ QWidget w;
+ w.show();
+
+ QWidget *wA = new QWidget;
+ QHBoxLayout *layoutA = new QHBoxLayout;
+
+ QWidget *wB = new QWidget;
+ layoutA->addWidget(wB);
+
+ QWidget *wC = new QWidget;
+ layoutA->addWidget(wC);
+
+ wA->setLayout(layoutA);
+
+ QWidget *wD = new QWidget;
+ wD->setAttribute(Qt::WA_NativeWindow);
+ wD->setParent(wB);
+
+ QWidget *wE = new QWidget(wC, Qt::Tool | Qt::FramelessWindowHint | Qt::WindowTransparentForInput);
+ wE->show();
+
+ wA->setParent(&w);
+
+ // QTBUG-35600: program may crash here or on exit
+}
+
QTEST_MAIN(tst_QWidget_window)
#include "tst_qwidget_window.moc"