summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorMarc Mutz <marc.mutz@kdab.com>2014-07-29 15:27:57 +0200
committerMarc Mutz <marc.mutz@kdab.com>2014-07-30 23:38:35 +0200
commit41dae1e33ae9f9eafc2c0dddef04d9c5cabe0e56 (patch)
treea4575e02cd849aa525b9966b05eb8fe5ba1c40d8 /tests
parentf5b9c38a9f01b08746034c24bed7a2d903f8079f (diff)
tst_QProgressDialog: enable topLevelWindows() check in cleanup()
Detects widget leaks. Change-Id: Ia2287debc96a5b87b224b887661679eba8622dc0 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: David Faure <david.faure@kdab.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/widgets/dialogs/qprogressdialog/tst_qprogressdialog.cpp8
1 files changed, 7 insertions, 1 deletions
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 <QtTest/QtTest>
-#include <qcoreapplication.h>
+#include <qapplication.h>
#include <qdebug.h>
#include <qprogressdialog.h>
#include <qlabel.h>
@@ -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<int>("min");