summaryrefslogtreecommitdiffstats
path: root/src/concurrent/qtconcurrentexception.h
diff options
context:
space:
mode:
authorMarc Mutz <marc.mutz@kdab.com>2012-08-27 12:24:48 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2012-09-28 23:50:10 +0200
commit3a29976eac1ff95e663d49886dc82611a175fed9 (patch)
tree31d70d25501a0f95e17b65e4c029c5c40b75610f /src/concurrent/qtconcurrentexception.h
parent5414a9a03bec65fd180f3c29811397df14130881 (diff)
Move QtConcurrent::Exception as QException back to QtCore
Leave the old name as a deprecated typedef; adapt users. This is a prerequisite for moving QFuture back to QtCore. Change-Id: I81dcee2c7e6eb234c16f3f42e2415ca0da3dc4f8 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/concurrent/qtconcurrentexception.h')
-rw-r--r--src/concurrent/qtconcurrentexception.h64
1 files changed, 4 insertions, 60 deletions
diff --git a/src/concurrent/qtconcurrentexception.h b/src/concurrent/qtconcurrentexception.h
index 0c86f08d75..373d42ee64 100644
--- a/src/concurrent/qtconcurrentexception.h
+++ b/src/concurrent/qtconcurrentexception.h
@@ -46,12 +46,7 @@
#ifndef QT_NO_QFUTURE
-#include <QtCore/qatomic.h>
-#include <QtCore/qshareddata.h>
-
-#ifndef QT_NO_EXCEPTIONS
-# include <exception>
-#endif
+#include <QtCore/qexception.h>
QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
@@ -62,59 +57,8 @@ namespace QtConcurrent
#ifndef QT_NO_EXCEPTIONS
-class Q_CONCURRENT_EXPORT Exception : public std::exception
-{
-public:
- virtual void raise() const;
- virtual Exception *clone() const;
-};
-
-class Q_CONCURRENT_EXPORT UnhandledException : public Exception
-{
-public:
- void raise() const;
- Exception *clone() const;
-};
-
-namespace internal {
-
-class Base;
-class ExceptionHolder
-{
-public:
- ExceptionHolder(Exception *exception = 0);
- ExceptionHolder(const ExceptionHolder &other);
- void operator=(const ExceptionHolder &other);
- ~ExceptionHolder();
- Exception *exception() const;
- QExplicitlySharedDataPointer<Base> base;
-};
-
-class Q_CONCURRENT_EXPORT ExceptionStore
-{
-public:
- void setException(const Exception &e);
- bool hasException() const;
- ExceptionHolder exception();
- void throwPossibleException();
- bool hasThrown() const;
- ExceptionHolder exceptionHolder;
-};
-
-} // namespace internal
-
-#else // QT_NO_EXCEPTIONS
-
-namespace internal {
-
-class Q_CONCURRENT_EXPORT ExceptionStore
-{
-public:
- ExceptionStore() { }
- inline void throwPossibleException() const {}
-};
-
-} // namespace internal
+typedef Q_DECL_DEPRECATED QException Exception;
+typedef Q_DECL_DEPRECATED QUnhandledException UnhandledException;
#endif
@@ -123,6 +67,6 @@ public:
QT_END_NAMESPACE
QT_END_HEADER
-#endif // QT_NO_CONCURRENT
+#endif // QT_NO_QFUTURE
#endif