diff options
| author | Thiago Macieira <thiago.macieira@intel.com> | 2024-12-21 12:08:32 -0300 |
|---|---|---|
| committer | Thiago Macieira <thiago.macieira@intel.com> | 2024-12-26 08:34:38 -0300 |
| commit | b8f84fd1e2af38ece89d60619bf93e7af34433ab (patch) | |
| tree | 86258cbb7e6570d178d6965ae033e008a9ca3596 /src/corelib/global/qexceptionhandling.h | |
| parent | d9264ee65d6f24e1008b08494b1472a54ac01940 (diff) | |
Replace qTerminate() with std::terminate() and mark it for removal
It was used by the QT_TERMINATE_ON_EXCEPTION macro, introduced in 2012,
to support pre-C++11 noexcept semantics. That macro was removed for Qt
6.8 in commit 9b2ae564a59656d9cf49b141e70f5958b4fb79a4. This commit
amends that removing the definition of qTerminate() immediately in Qt
6.9 (it was an \internal function).
Pick-to: 6.9
Change-Id: I9682121c04fafb3676b0fffd9f5ac999e7603c84
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
Diffstat (limited to 'src/corelib/global/qexceptionhandling.h')
| -rw-r--r-- | src/corelib/global/qexceptionhandling.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/corelib/global/qexceptionhandling.h b/src/corelib/global/qexceptionhandling.h index 7ffd0798f6f..6c547a90630 100644 --- a/src/corelib/global/qexceptionhandling.h +++ b/src/corelib/global/qexceptionhandling.h @@ -22,7 +22,6 @@ QT_BEGIN_NAMESPACE If you can't live with those constraints, don't use these macros. Use the QT_NO_EXCEPTIONS macro to protect your code instead. */ -Q_NORETURN Q_DECL_COLD_FUNCTION Q_CORE_EXPORT void qTerminate() noexcept; #ifdef QT_NO_EXCEPTIONS # define QT_TRY if (true) # define QT_CATCH(A) else @@ -35,6 +34,10 @@ Q_NORETURN Q_DECL_COLD_FUNCTION Q_CORE_EXPORT void qTerminate() noexcept; # define QT_RETHROW throw #endif +#if QT_CORE_REMOVED_SINCE(6, 9) +Q_NORETURN Q_DECL_COLD_FUNCTION Q_CORE_EXPORT void qTerminate() noexcept; +#endif + QT_END_NAMESPACE #endif // QEXCEPTIONHANDLING_H |
