Marc Mutz e5890084dc QThread: mark is(Main|Current)Thread() noexcept
The rationale given for the addition of these functions was that they
are a more efficient way to check these things in public API.

If so, they shouldn't cause compilers to insert exception handling
around their calls, so mark them noexcept.

This is safe, as both conceptually and practically, these functions
should not and cannot fail, so we'll never need to remove noexcept
again.

Found in API-Review.

Amends 7a374c38d288435b3c0a76b82a1c2ca53ea9c003 and
a3d50112e44bc42b310d9d3a8e6c7805ef31ef53.

These two commits also lacked each the changelog entry, so adding them
here:

[ChangeLog][QtCore][QThread] Added isMainThread() static member
function.

[ChangeLog][QtCore][QThread] Added isCurrentThread() member function.

Change-Id: Iaf39ce2cc0abd45049bff60b24693e84bf76d9e0
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit d73a2bf0fb3e0a00691c858645a5a5bb2b55b40a)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-06-12 15:53:35 +00:00
Description
Qt Base (Core, Gui, Widgets, Network, ...)
822 MiB
Languages
C++ 84.3%
HTML 4.9%
C 3.9%
CMake 3.6%
Objective-C++ 2%
Other 0.8%