summaryrefslogtreecommitdiffstats
path: root/tests/auto/qfuture
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/qfuture')
-rw-r--r--tests/auto/qfuture/qfuture.pro1
-rw-r--r--tests/auto/qfuture/tst_qfuture.cpp28
-rw-r--r--tests/auto/qfuture/versioncheck.h4
3 files changed, 33 insertions, 0 deletions
diff --git a/tests/auto/qfuture/qfuture.pro b/tests/auto/qfuture/qfuture.pro
index c2b16b7..d6faae7 100644
--- a/tests/auto/qfuture/qfuture.pro
+++ b/tests/auto/qfuture/qfuture.pro
@@ -2,3 +2,4 @@ load(qttest_p4)
DEFINES += QT_STRICT_ITERATORS
SOURCES += tst_qfuture.cpp
QT = core
+CONFIG += parallel_test
diff --git a/tests/auto/qfuture/tst_qfuture.cpp b/tests/auto/qfuture/tst_qfuture.cpp
index d78dc19..2fa329b 100644
--- a/tests/auto/qfuture/tst_qfuture.cpp
+++ b/tests/auto/qfuture/tst_qfuture.cpp
@@ -81,6 +81,7 @@ private slots:
void voidConversions();
#ifndef QT_NO_EXCEPTIONS
void exceptions();
+ void exceptions_QTBUG18149();
#endif
};
@@ -1431,6 +1432,33 @@ void tst_QFuture::exceptions()
}
+
+void tst_QFuture::exceptions_QTBUG18149()
+{
+ class MyClass
+ {
+ public:
+ ~MyClass()
+ {
+ QFuture<void> f = createExceptionFuture();
+ bool caught = false;
+ try {
+ f.waitForFinished();
+ } catch (Exception &) {
+ caught = true;
+ }
+ QVERIFY(caught);
+ }
+ };
+
+ try {
+ MyClass m;
+ throw 0;
+ } catch (int) {}
+
+}
+
+
#endif // QT_NO_EXCEPTIONS
#include "tst_qfuture.moc"
diff --git a/tests/auto/qfuture/versioncheck.h b/tests/auto/qfuture/versioncheck.h
index 9e4d0c6..7101ea2 100644
--- a/tests/auto/qfuture/versioncheck.h
+++ b/tests/auto/qfuture/versioncheck.h
@@ -47,3 +47,7 @@
#if defined(Q_CC_MSVC) && _MSC_VER < 1400
#define QT_NO_CONCURRENT_TEST
#endif
+
+#if defined(Q_CC_NOKIAX86)
+#define QT_NO_CONCURRENT_TEST
+#endif