diff options
author | Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> | 2014-11-18 17:10:33 +0100 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> | 2014-11-20 22:30:28 +0100 |
commit | 6c5d1dbd75f4edf886420cb07efeb1c20a1b0bbf (patch) | |
tree | a01271e4abdcb3385e99b82bad574d429987e87a /tests/auto/widgets | |
parent | f217a8096b3c6188dd1d1520d854f330dbb17264 (diff) |
Fix widget leak in tst_qmainwindow.
Task-number: QTBUG-38152
Change-Id: I4cf94a4a8977019dcfc099966643b5b036cc1021
Reviewed-by: Jan Arve Sæther <jan-arve.saether@theqtcompany.com>
Diffstat (limited to 'tests/auto/widgets')
-rw-r--r-- | tests/auto/widgets/widgets/qmainwindow/tst_qmainwindow.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/auto/widgets/widgets/qmainwindow/tst_qmainwindow.cpp b/tests/auto/widgets/widgets/qmainwindow/tst_qmainwindow.cpp index 27c803b43d..751a16c59d 100644 --- a/tests/auto/widgets/widgets/qmainwindow/tst_qmainwindow.cpp +++ b/tests/auto/widgets/widgets/qmainwindow/tst_qmainwindow.cpp @@ -104,6 +104,7 @@ public: tst_QMainWindow(); private slots: + void cleanup(); void getSetCheck(); void constructor(); void iconSize(); @@ -147,6 +148,12 @@ private slots: void QTBUG21378_animationFinished(); }; + +void tst_QMainWindow::cleanup() +{ + QVERIFY(QApplication::topLevelWidgets().isEmpty()); +} + // Testing get/set functions void tst_QMainWindow::getSetCheck() { @@ -854,6 +861,7 @@ void tst_QMainWindow::takeCentralWidget() { QVERIFY(!w2.isNull()); QCOMPARE(w2.data(), hopefullyW2); + delete w2; } void tst_QMainWindow::corner() |