summaryrefslogtreecommitdiffstats
path: root/src/corelib/global/qexceptionhandling.cpp
diff options
context:
space:
mode:
authorSona Kurazyan <sona.kurazyan@qt.io>2022-08-16 17:18:13 +0200
committerSona Kurazyan <sona.kurazyan@qt.io>2022-08-19 09:15:39 +0200
commit0329792602310577fa66c6991b891140b6edd210 (patch)
treeef71e52870bc650cff4957057f455635e3c121df /src/corelib/global/qexceptionhandling.cpp
parent7d228473719e51995d3ebb497c53c93959e8b58b (diff)
Extract header qexceptionhandling.h from qglobal.h
As a drive-by, remove the unused include for std::bad_alloc from qglobal.cpp. Task-number: QTBUG-99313 Change-Id: I4b26b4413e6fe7ac3b1e285d0db5b81b429a4713 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Diffstat (limited to 'src/corelib/global/qexceptionhandling.cpp')
-rw-r--r--src/corelib/global/qexceptionhandling.cpp20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/corelib/global/qexceptionhandling.cpp b/src/corelib/global/qexceptionhandling.cpp
new file mode 100644
index 0000000000..f74eb49546
--- /dev/null
+++ b/src/corelib/global/qexceptionhandling.cpp
@@ -0,0 +1,20 @@
+// Copyright (C) 2022 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+
+#include "qexceptionhandling.h"
+
+#include <exception>
+
+QT_BEGIN_NAMESPACE
+
+/*
+ \internal
+ Allows you to call std::terminate() without including <exception>.
+ Called internally from QT_TERMINATE_ON_EXCEPTION
+*/
+Q_NORETURN void qTerminate() noexcept
+{
+ std::terminate();
+}
+
+QT_END_NAMESPACE