From 83139a4baa3fb3ed77bbc4d5bf3fce178be1aae2 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Tue, 15 Oct 2024 10:14:10 -0700 Subject: [PATCH] QThread: reorganize and clean up #includes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Removing unused headers and sorting them in the standard "mine", "Qt's" and "other" order. Sorted by file name, not complete path. Change-Id: I6cbcdb5887175bdd7618fffd0627222ff4718efc Reviewed-by: MÃ¥rten Nordheim Reviewed-by: Ahmad Samir --- src/corelib/thread/qthread.cpp | 13 ++++--------- src/corelib/thread/qthread_unix.cpp | 28 ++++++++++------------------ src/corelib/thread/qthread_win.cpp | 8 +++----- 3 files changed, 17 insertions(+), 32 deletions(-) diff --git a/src/corelib/thread/qthread.cpp b/src/corelib/thread/qthread.cpp index 0f939abf156..870689f4d0c 100644 --- a/src/corelib/thread/qthread.cpp +++ b/src/corelib/thread/qthread.cpp @@ -3,18 +3,13 @@ // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only #include "qthread.h" -#include "qthreadstorage.h" -#include "qmutex.h" -#include "qreadwritelock.h" +#include "qthread_p.h" + #include "qabstracteventdispatcher.h" #include "qbindingstorage.h" - -#include - -#include "qthread_p.h" #include "private/qcoreapplication_p.h" - -#include +#include "qeventloop.h" +#include "qmutex.h" QT_BEGIN_NAMESPACE diff --git a/src/corelib/thread/qthread_unix.cpp b/src/corelib/thread/qthread_unix.cpp index c82ba32b505..a540687dcd1 100644 --- a/src/corelib/thread/qthread_unix.cpp +++ b/src/corelib/thread/qthread_unix.cpp @@ -3,33 +3,25 @@ // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only #include "qthread.h" - -#include "qplatformdefs.h" +#include "qthread_p.h" #include #include +#include "qdebug.h" +#include "qthreadstorage.h" #include -#if defined(Q_OS_DARWIN) -# include -#elif defined(Q_OS_WASM) -# include +#if defined(Q_OS_WASM) +# include #else -# if !defined(QT_NO_GLIB) -# include "../kernel/qeventdispatcher_glib_p.h" +# include +# if defined(Q_OS_DARWIN) +# include +# elif !defined(QT_NO_GLIB) +# include # endif #endif -#if !defined(Q_OS_WASM) -# include -#endif - -#include "qthreadstorage.h" - -#include "qthread_p.h" - -#include "qdebug.h" - #ifdef __GLIBCXX__ #include #endif diff --git a/src/corelib/thread/qthread_win.cpp b/src/corelib/thread/qthread_win.cpp index 27f0cdf1c9a..6d8d630f2cf 100644 --- a/src/corelib/thread/qthread_win.cpp +++ b/src/corelib/thread/qthread_win.cpp @@ -3,14 +3,12 @@ #include "qthread.h" #include "qthread_p.h" -#include "qthreadstorage.h" -#include "qmutex.h" - -#include -#include +#include "qcoreapplication.h" #include #include +#include "qmutex.h" +#include "qthreadstorage.h" #include