diff options
author | Liang Qi <liang.qi@qt.io> | 2016-10-31 09:26:35 +0100 |
---|---|---|
committer | Liang Qi <liang.qi@qt.io> | 2016-10-31 09:26:35 +0100 |
commit | 8e20daae9fee5f3b999daffce0d7156015ee974b (patch) | |
tree | 7adcc397fd378cbb97c186ddb78c226b61906583 /tests/auto | |
parent | 5545e5aa6e265469d278e1fb576a737535784422 (diff) | |
parent | 694702e09d9b17d91db282784f009178cfb1059b (diff) |
Merge remote-tracking branch 'origin/5.6' into 5.7
Conflicts:
src/plugins/platforms/minimalegl/qminimaleglintegration.cpp
Change-Id: Ia6ab42a6daadbf8abc085c971545904d49ea4b56
Diffstat (limited to 'tests/auto')
-rw-r--r-- | tests/auto/widgets/widgets/qmainwindow/tst_qmainwindow.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/auto/widgets/widgets/qmainwindow/tst_qmainwindow.cpp b/tests/auto/widgets/widgets/qmainwindow/tst_qmainwindow.cpp index 5bd26c632c..6ee5f76c6a 100644 --- a/tests/auto/widgets/widgets/qmainwindow/tst_qmainwindow.cpp +++ b/tests/auto/widgets/widgets/qmainwindow/tst_qmainwindow.cpp @@ -859,6 +859,10 @@ void tst_QMainWindow::takeCentralWidget() { QVERIFY(!mw.centralWidget()); + // verify that we don't crash when trying to take a non-set + // central widget but just return a null pointer instead + QVERIFY(!mw.takeCentralWidget()); + mw.setCentralWidget(w1); QWidget *oldCentralWidget = mw.takeCentralWidget(); |