From 895dbac45497d1b9918a0fafa9df8277f8069e37 Mon Sep 17 00:00:00 2001 From: Marc Mutz Date: Thu, 11 Jun 2015 21:20:25 +0200 Subject: QException: fix exception specification Some broken compilers (known broken: GCC 4.7; known good: GCC 4.9) don't understand that destructors are implicitly noexcept and complain about a weaker exception specification on ~QException than on ~std::exception. Change-Id: I433475fcf345d7da55e8da667cf9821ee09c0d8a Reviewed-by: Olivier Goffart (Woboq GmbH) --- src/corelib/thread/qexception.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/corelib/thread/qexception.cpp') diff --git a/src/corelib/thread/qexception.cpp b/src/corelib/thread/qexception.cpp index 01bbe70c88a..04a03b86233 100644 --- a/src/corelib/thread/qexception.cpp +++ b/src/corelib/thread/qexception.cpp @@ -108,7 +108,9 @@ QT_BEGIN_NAMESPACE */ QException::~QException() -#ifndef Q_COMPILER_NOEXCEPT +#ifdef Q_COMPILER_NOEXCEPT + noexcept +#else throw() #endif { @@ -127,7 +129,9 @@ QException *QException::clone() const } QUnhandledException::~QUnhandledException() -#ifndef Q_COMPILER_NOEXCEPT +#ifdef Q_COMPILER_NOEXCEPT + noexcept +#else throw() #endif { -- cgit v1.2.3