diff options
author | Marc Mutz <marc.mutz@kdab.com> | 2015-05-26 22:16:25 +0200 |
---|---|---|
committer | Marc Mutz <marc.mutz@kdab.com> | 2015-06-02 21:50:53 +0000 |
commit | 2fa7b3b317fa941064ec4ba62163e3244becf55a (patch) | |
tree | d1d89310e353901412a1cc1b0f7aad7e56191813 /src/corelib/thread/qexception.h | |
parent | b1a0cf72f84803196539c4b0b03bfaeea9000d94 (diff) |
Q(Unhandled)Exception: declare dtor out-of-line
De-duplicates vtables and enables RTTI on this hierarchy.
This is esp. important for exception classes, as RTTI is used
to select the catch clause to handle the exception in-flight.
The issue is made a bit complicated by the fact that the
exception specification changed from C++98 to 11 and that C++98
clients require the empty throw() specification while we don't
want to introduce warnings for C++11 users.
Let's hope no compiler includes throw specs into the mangled
names.
Task-number: QTBUG-45582
Change-Id: If086c8c38fccdc2c9c7e2aa7a492192cc1f86a6c
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib/thread/qexception.h')
-rw-r--r-- | src/corelib/thread/qexception.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/corelib/thread/qexception.h b/src/corelib/thread/qexception.h index 55fc441020..edf361ebd3 100644 --- a/src/corelib/thread/qexception.h +++ b/src/corelib/thread/qexception.h @@ -53,6 +53,11 @@ QT_BEGIN_NAMESPACE class Q_CORE_EXPORT QException : public std::exception { public: + ~QException() +#ifndef Q_COMPILER_NOEXCEPT + throw() +#endif + ; virtual void raise() const; virtual QException *clone() const; }; @@ -60,6 +65,11 @@ public: class Q_CORE_EXPORT QUnhandledException : public QException { public: + ~QUnhandledException() +#ifndef Q_COMPILER_NOEXCEPT + throw() +#endif +; void raise() const Q_DECL_OVERRIDE; QUnhandledException *clone() const Q_DECL_OVERRIDE; }; |