summaryrefslogtreecommitdiffstats
path: root/src/corelib/kernel/qobject.cpp
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@intel.com>2015-07-06 21:16:09 -0700
committerThiago Macieira <thiago.macieira@intel.com>2015-07-08 03:20:35 +0000
commit477721250dfc9d83a74bced6765dff19a1ceebf3 (patch)
tree1dbda1d609124aa2d6f19fd1197c7242a86b2326 /src/corelib/kernel/qobject.cpp
parentd01d08971a1ba4d66927a48577041abc5b7df8a2 (diff)
Remove the warning printed when QObject's destructor catches exceptions
The warning is useless, since the application is about to terminate anyway. The user will be better informed by getting a proper backtrace of the throw point, instead of the rethrow point inside QObject's destructor. The application WILL terminate because C++11 destructors are noexcept and GCC 6 enforces it: qobject.cpp:909:13: error: throw will always call terminate() [- Werror=terminate] qobject.cpp:909:13: note: in C++11 destructors default to noexcept QT_RETHROW; ^ Change-Id: Ib056b47dde3341ef9a52ffff13ee8f01d874d224 Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Diffstat (limited to 'src/corelib/kernel/qobject.cpp')
-rw-r--r--src/corelib/kernel/qobject.cpp9
1 files changed, 1 insertions, 8 deletions
diff --git a/src/corelib/kernel/qobject.cpp b/src/corelib/kernel/qobject.cpp
index 676a529dfe..cc6970eaeb 100644
--- a/src/corelib/kernel/qobject.cpp
+++ b/src/corelib/kernel/qobject.cpp
@@ -900,14 +900,7 @@ QObject::~QObject()
}
if (!d->isWidget && d->isSignalConnected(0)) {
- QT_TRY {
- emit destroyed(this);
- } QT_CATCH(...) {
- // all the signal/slots connections are still in place - if we don't
- // quit now, we will crash pretty soon.
- qWarning("Detected an unexpected exception in ~QObject while emitting destroyed().");
- QT_RETHROW;
- }
+ emit destroyed(this);
}
if (d->declarativeData) {