qglobal.h: Do not include <algorithm>

algorithm is a rather heavy header, so we do not want to include it
everywhere. It most likely was put into qglobal, because before C++11,
swap could be found there. However, since C++11 it is located in
<utility>, which we already include. Thus drop the superfluous include.

[ChangeLog][QtCore][Potential source breaking change] The <algorithm>
header is no longer transitively included with qglobal.h. If you used
functionality from that header and relied on the transitive include, you
will now need to explicitly add the header.

Change-Id: Idc1912956b483d313dafd61b8f6a49d60eed8d3c
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This commit is contained in:
Fabian Kosmale 2021-10-27 14:18:16 +02:00
parent e7a1fbfc47
commit bbfd625b63

View File

@ -143,8 +143,6 @@ static_assert(!std::is_convertible_v<std::nullptr_t, bool>,
#ifdef __cplusplus
#include <algorithm>
#if !defined(QT_NAMESPACE) || defined(Q_MOC_RUN) /* user namespace */
# define QT_PREPEND_NAMESPACE(name) ::name