Fix build with QT_NO_EXCEPTIONS
authorHarald Fernengel <harald.fernengel@nokia.com>
Wed, 12 Sep 2012 12:27:18 +0000 (14:27 +0200)
committerQt by Nokia <qt-info@nokia.com>
Wed, 12 Sep 2012 13:24:17 +0000 (15:24 +0200)
qTerminate is declared within a #ifndef QT_NO_EXCEPTIONS block, so the
implementation must use the same #ifdef

Change-Id: I5d2d58a55fce5084c0538d18a9dd3998b12ed703
Reviewed-by: Qt Doc Bot <qt_docbot@qt-project.org>
Reviewed-by: Arvid Picciani <aep@exys.org>
src/corelib/global/qglobal.cpp

index df4eb0e..c9a73c5 100644 (file)
@@ -1920,6 +1920,7 @@ void qBadAlloc()
     QT_THROW(std::bad_alloc());
 }
 
+#ifndef QT_NO_EXCEPTIONS
 /*
    \internal
    Allows you to call std::terminate() without including <exception>.
@@ -1929,6 +1930,7 @@ Q_NORETURN void qTerminate() Q_DECL_NOTHROW
 {
     std::terminate();
 }
+#endif
 
 /*
   The Q_ASSERT macro calls this function when the test fails.