From 41dae1e33ae9f9eafc2c0dddef04d9c5cabe0e56 Mon Sep 17 00:00:00 2001 From: Marc Mutz Date: Tue, 29 Jul 2014 15:27:57 +0200 Subject: tst_QProgressDialog: enable topLevelWindows() check in cleanup() Detects widget leaks. Change-Id: Ia2287debc96a5b87b224b887661679eba8622dc0 Reviewed-by: Friedemann Kleint Reviewed-by: David Faure --- .../auto/widgets/dialogs/qprogressdialog/tst_qprogressdialog.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/tests/auto/widgets/dialogs/qprogressdialog/tst_qprogressdialog.cpp b/tests/auto/widgets/dialogs/qprogressdialog/tst_qprogressdialog.cpp index f11fb1554c..aadc95e640 100644 --- a/tests/auto/widgets/dialogs/qprogressdialog/tst_qprogressdialog.cpp +++ b/tests/auto/widgets/dialogs/qprogressdialog/tst_qprogressdialog.cpp @@ -42,7 +42,7 @@ #include -#include +#include #include #include #include @@ -53,6 +53,7 @@ class tst_QProgressDialog : public QObject Q_OBJECT private Q_SLOTS: + void cleanup(); void autoShow_data(); void autoShow(); void getSetCheck(); @@ -60,6 +61,11 @@ private Q_SLOTS: void QTBUG_31046(); }; +void tst_QProgressDialog::cleanup() +{ + QVERIFY(QApplication::topLevelWindows().empty()); +} + void tst_QProgressDialog::autoShow_data() { QTest::addColumn("min"); -- cgit v1.2.3