diff options
Diffstat (limited to 'src/corelib/thread/qexception.h')
| -rw-r--r-- | src/corelib/thread/qexception.h | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/src/corelib/thread/qexception.h b/src/corelib/thread/qexception.h index 1a21d175252..986eb43e1b3 100644 --- a/src/corelib/thread/qexception.h +++ b/src/corelib/thread/qexception.h @@ -62,12 +62,28 @@ public: virtual QException *clone() const; }; -class Q_CORE_EXPORT QUnhandledException : public QException +class QUnhandledExceptionPrivate; +class Q_CORE_EXPORT QUnhandledException final : public QException { public: - ~QUnhandledException() noexcept; + QUnhandledException(std::exception_ptr exception = nullptr) noexcept; + ~QUnhandledException() noexcept override; + + QUnhandledException(QUnhandledException &&other) noexcept; + QUnhandledException(const QUnhandledException &other) noexcept; + + void swap(QUnhandledException &other) noexcept { qSwap(d, other.d); } + + QT_MOVE_ASSIGNMENT_OPERATOR_IMPL_VIA_PURE_SWAP(QUnhandledException) + QUnhandledException &operator=(const QUnhandledException &other) noexcept; + void raise() const override; QUnhandledException *clone() const override; + + std::exception_ptr exception() const; + +private: + QSharedDataPointer<QUnhandledExceptionPrivate> d; }; namespace QtPrivate { |
