From 516aa662a06fd01e7caf23f282702465a23424b8 Mon Sep 17 00:00:00 2001 From: Ahmad Samir Date: Mon, 13 Feb 2023 00:50:10 +0200 Subject: [PATCH] Break qglobal.h cyclic includes [3/3] MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ... with q*atomic.h. Drive-by change: include instead of , from the former's docs: «This is a Standard C++ Library file. You should @c \#include this file in your programs, rather than any of the @a *.h implementation files.» Task-number: QTBUG-106722 Change-Id: Id8169c482d2231c1620db033fbed1f904e15ed9c Reviewed-by: Thiago Macieira --- src/corelib/thread/qatomic.h | 2 -- src/corelib/thread/qbasicatomic.h | 2 -- src/corelib/thread/qgenericatomic.h | 1 - src/corelib/tools/qcontiguouscache.cpp | 2 ++ src/corelib/tools/qcontiguouscache.h | 7 ++++++- 5 files changed, 8 insertions(+), 6 deletions(-) diff --git a/src/corelib/thread/qatomic.h b/src/corelib/thread/qatomic.h index 24f2616e82..7fe5ac69b9 100644 --- a/src/corelib/thread/qatomic.h +++ b/src/corelib/thread/qatomic.h @@ -2,8 +2,6 @@ // Copyright (C) 2016 Intel Corporation. // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only -#include - #ifndef QATOMIC_H #define QATOMIC_H diff --git a/src/corelib/thread/qbasicatomic.h b/src/corelib/thread/qbasicatomic.h index d03c270ed6..e3fbe55890 100644 --- a/src/corelib/thread/qbasicatomic.h +++ b/src/corelib/thread/qbasicatomic.h @@ -2,8 +2,6 @@ // Copyright (C) 2018 Intel Corporation. // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only -#include - #ifndef QBASICATOMIC_H #define QBASICATOMIC_H diff --git a/src/corelib/thread/qgenericatomic.h b/src/corelib/thread/qgenericatomic.h index b8a022a2ac..0e4a8a7562 100644 --- a/src/corelib/thread/qgenericatomic.h +++ b/src/corelib/thread/qgenericatomic.h @@ -5,7 +5,6 @@ #ifndef QGENERICATOMIC_H #define QGENERICATOMIC_H -#include #include QT_BEGIN_NAMESPACE diff --git a/src/corelib/tools/qcontiguouscache.cpp b/src/corelib/tools/qcontiguouscache.cpp index 73cfed97f2..d28d1e7153 100644 --- a/src/corelib/tools/qcontiguouscache.cpp +++ b/src/corelib/tools/qcontiguouscache.cpp @@ -6,6 +6,8 @@ #include #endif +#include + QT_BEGIN_NAMESPACE #ifdef QT_QCONTIGUOUSCACHE_DEBUG diff --git a/src/corelib/tools/qcontiguouscache.h b/src/corelib/tools/qcontiguouscache.h index 98fa82fda9..7b167292a8 100644 --- a/src/corelib/tools/qcontiguouscache.h +++ b/src/corelib/tools/qcontiguouscache.h @@ -5,7 +5,12 @@ #define QCONTIGUOUSCACHE_H #include -#include +#include +#include +#include + +#include +#include #include QT_BEGIN_NAMESPACE