summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/qprogressdialog/tst_qprogressdialog.cpp18
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/auto/qprogressdialog/tst_qprogressdialog.cpp b/tests/auto/qprogressdialog/tst_qprogressdialog.cpp
index 953ef48..459a38e 100644
--- a/tests/auto/qprogressdialog/tst_qprogressdialog.cpp
+++ b/tests/auto/qprogressdialog/tst_qprogressdialog.cpp
@@ -46,11 +46,19 @@
#include <qdebug.h>
#include <qprogressdialog.h>
#include <qlabel.h>
+#include <qthread.h>
//TESTED_CLASS=
//TESTED_FILES=
+class TestThread : QThread {
+public:
+ TestThread(unsigned long msecs) {
+ QThread::msleep(msecs);
+ }
+};
+
class tst_QProgressDialog : public QObject
{
Q_OBJECT
@@ -62,6 +70,7 @@ public:
private slots:
void getSetCheck();
void task198202();
+ void QTBUG_31046();
};
tst_QProgressDialog::tst_QProgressDialog()
@@ -153,5 +162,14 @@ void tst_QProgressDialog::task198202()
QCOMPARE(dlg.sizeHint().height(), futureHeight);
}
+void tst_QProgressDialog::QTBUG_31046()
+{
+ QProgressDialog dlg("", "", 50, 60);
+ dlg.setValue(0);
+ TestThread(200);
+ dlg.setValue(50);
+ QCOMPARE(50, dlg.value());
+}
+
QTEST_MAIN(tst_QProgressDialog)
#include "tst_qprogressdialog.moc"