summaryrefslogtreecommitdiffstats
path: root/tests/auto
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto')
-rw-r--r--tests/auto/concurrent/qfuture/tst_qfuture.cpp22
-rw-r--r--tests/auto/concurrent/qtconcurrentmap/tst_qtconcurrentmap.cpp4
-rw-r--r--tests/auto/concurrent/qtconcurrentrun/tst_qtconcurrentrun.cpp8
-rw-r--r--tests/auto/concurrent/qtconcurrentthreadengine/tst_qtconcurrentthreadengine.cpp14
4 files changed, 24 insertions, 24 deletions
diff --git a/tests/auto/concurrent/qfuture/tst_qfuture.cpp b/tests/auto/concurrent/qfuture/tst_qfuture.cpp
index 4e681e79ae..aea35e80b2 100644
--- a/tests/auto/concurrent/qfuture/tst_qfuture.cpp
+++ b/tests/auto/concurrent/qfuture/tst_qfuture.cpp
@@ -1276,7 +1276,7 @@ QFuture<void> createExceptionFuture()
i.reportStarted();
QFuture<void> f = i.future();
- Exception e;
+ QException e;
i.reportException(e);
i.reportFinished();
return f;
@@ -1290,17 +1290,17 @@ QFuture<int> createExceptionResultFuture()
int r = 0;
i.reportResult(r);
- Exception e;
+ QException e;
i.reportException(e);
i.reportFinished();
return f;
}
-class DerivedException : public Exception
+class DerivedException : public QException
{
public:
void raise() const { throw *this; }
- Exception *clone() const { return new DerivedException(*this); }
+ DerivedException *clone() const { return new DerivedException(*this); }
};
QFuture<void> createDerivedExceptionFuture()
@@ -1323,7 +1323,7 @@ void tst_QFuture::exceptions()
bool caught = false;
try {
f.waitForFinished();
- } catch (Exception &) {
+ } catch (QException &) {
caught = true;
}
QVERIFY(caught);
@@ -1335,7 +1335,7 @@ void tst_QFuture::exceptions()
bool caught = false;
try {
f.result();
- } catch (Exception &) {
+ } catch (QException &) {
caught = true;
}
QVERIFY(caught);
@@ -1346,7 +1346,7 @@ void tst_QFuture::exceptions()
bool caught = false;
try {
createExceptionResultFuture().result();
- } catch (Exception &) {
+ } catch (QException &) {
caught = true;
}
QVERIFY(caught);
@@ -1358,7 +1358,7 @@ void tst_QFuture::exceptions()
bool caught = false;
try {
f.results();
- } catch (Exception &) {
+ } catch (QException &) {
caught = true;
}
QVERIFY(caught);
@@ -1373,7 +1373,7 @@ void tst_QFuture::exceptions()
Q_UNUSED(e);
QFAIL("did not get exception");
}
- } catch (Exception &) {
+ } catch (QException &) {
caught = true;
}
QVERIFY(caught);
@@ -1384,7 +1384,7 @@ void tst_QFuture::exceptions()
bool caught = false;
try {
createDerivedExceptionFuture().waitForFinished();
- } catch (Exception &) {
+ } catch (QException &) {
caught = true;
}
QVERIFY(caught);
@@ -1409,7 +1409,7 @@ public:
QFuture<void> f = createExceptionFuture();
try {
f.waitForFinished();
- } catch (Exception &) {
+ } catch (QException &) {
caught = true;
}
}
diff --git a/tests/auto/concurrent/qtconcurrentmap/tst_qtconcurrentmap.cpp b/tests/auto/concurrent/qtconcurrentmap/tst_qtconcurrentmap.cpp
index 48837d3ee0..186ee826cf 100644
--- a/tests/auto/concurrent/qtconcurrentmap/tst_qtconcurrentmap.cpp
+++ b/tests/auto/concurrent/qtconcurrentmap/tst_qtconcurrentmap.cpp
@@ -2205,7 +2205,7 @@ void tst_QtConcurrentMap::throttling()
void throwMapper(int &e)
{
Q_UNUSED(e);
- throw QtConcurrent::Exception();
+ throw QException();
}
void tst_QtConcurrentMap::exceptions()
@@ -2214,7 +2214,7 @@ void tst_QtConcurrentMap::exceptions()
try {
QList<int> list = QList<int>() << 1 << 2 << 3;
QtConcurrent::map(list, throwMapper).waitForFinished();
- } catch (const Exception &) {
+ } catch (const QException &) {
caught = true;
}
if (!caught)
diff --git a/tests/auto/concurrent/qtconcurrentrun/tst_qtconcurrentrun.cpp b/tests/auto/concurrent/qtconcurrentrun/tst_qtconcurrentrun.cpp
index af63c25240..f3f4be3f3f 100644
--- a/tests/auto/concurrent/qtconcurrentrun/tst_qtconcurrentrun.cpp
+++ b/tests/auto/concurrent/qtconcurrentrun/tst_qtconcurrentrun.cpp
@@ -367,12 +367,12 @@ int fn2(double, int *)
#ifndef QT_NO_EXCEPTIONS
void throwFunction()
{
- throw QtConcurrent::Exception();
+ throw QException();
}
int throwFunctionReturn()
{
- throw QtConcurrent::Exception();
+ throw QException();
return 0;
}
@@ -381,7 +381,7 @@ void tst_QtConcurrentRun::exceptions()
bool caught = false;
try {
QtConcurrent::run(throwFunction).waitForFinished();
- } catch (Exception &) {
+ } catch (QException &) {
caught = true;
}
if (!caught)
@@ -390,7 +390,7 @@ void tst_QtConcurrentRun::exceptions()
caught = false;
try {
QtConcurrent::run(throwFunctionReturn).waitForFinished();
- } catch (Exception &) {
+ } catch (QException &) {
caught = true;
}
if (!caught)
diff --git a/tests/auto/concurrent/qtconcurrentthreadengine/tst_qtconcurrentthreadengine.cpp b/tests/auto/concurrent/qtconcurrentthreadengine/tst_qtconcurrentthreadengine.cpp
index d2e4c74be8..edf9104571 100644
--- a/tests/auto/concurrent/qtconcurrentthreadengine/tst_qtconcurrentthreadengine.cpp
+++ b/tests/auto/concurrent/qtconcurrentthreadengine/tst_qtconcurrentthreadengine.cpp
@@ -425,7 +425,7 @@ public:
ThreadFunctionResult threadFunction()
{
QTest::qSleep(50);
- throw QtConcurrent::Exception();
+ throw QException();
return ThreadFinished;
}
QThread *blockThread;
@@ -457,7 +457,7 @@ void tst_QtConcurrentThreadEngine::exceptions()
QtConcurrentExceptionThrower *e = new QtConcurrentExceptionThrower();
QFuture<void> f = e->startAsynchronously();
f.waitForFinished();
- } catch (const Exception &) {
+ } catch (const QException &) {
caught = true;
}
QVERIFY2(caught, "did not get exception");
@@ -470,7 +470,7 @@ void tst_QtConcurrentThreadEngine::exceptions()
try {
QtConcurrentExceptionThrower e(QThread::currentThread());
e.startBlocking();
- } catch (const Exception &) {
+ } catch (const QException &) {
caught = true;
}
QVERIFY2(caught, "did not get exception");
@@ -482,7 +482,7 @@ void tst_QtConcurrentThreadEngine::exceptions()
try {
QtConcurrentExceptionThrower e(0);
e.startBlocking();
- } catch (const Exception &) {
+ } catch (const QException &) {
caught = true;
}
QVERIFY2(caught, "did not get exception");
@@ -495,7 +495,7 @@ void tst_QtConcurrentThreadEngine::exceptions()
UnrelatedExceptionThrower *e = new UnrelatedExceptionThrower();
QFuture<void> f = e->startAsynchronously();
f.waitForFinished();
- } catch (const QtConcurrent::UnhandledException &) {
+ } catch (const QUnhandledException &) {
caught = true;
}
QVERIFY2(caught, "did not get exception");
@@ -508,7 +508,7 @@ void tst_QtConcurrentThreadEngine::exceptions()
try {
UnrelatedExceptionThrower e(QThread::currentThread());
e.startBlocking();
- } catch (const QtConcurrent::UnhandledException &) {
+ } catch (const QUnhandledException &) {
caught = true;
}
QVERIFY2(caught, "did not get exception");
@@ -520,7 +520,7 @@ void tst_QtConcurrentThreadEngine::exceptions()
try {
UnrelatedExceptionThrower e(0);
e.startBlocking();
- } catch (const QtConcurrent::UnhandledException &) {
+ } catch (const QUnhandledException &) {
caught = true;
}
QVERIFY2(caught, "did not get exception");