From e4309df71ae99c20b5681ddf1476eca138cee986 Mon Sep 17 00:00:00 2001 From: Marc Mutz Date: Sat, 14 May 2022 09:23:53 +0200 Subject: qobject_p.h: remove unused qreadwritelock.h include Only qcoreapplication_p.h uses a QReadWriteLock (tanslationMutex), so include it only there. This include has caused QAtomicPointer to percolate to the top-5 of template instantiation hogs when compiling QtWidgets, as reported by Clang -ftime-trace. This patch improves that, because qcoreapplication_p.h isn't part of the PCH and is much less frequently included into QtWidgets TUs (68 instead of 142 times). Pick-to: 6.3 6.2 Change-Id: I2518040d83a04e7cef0645d7f4bf641fb50f49ff Reviewed-by: Fabian Kosmale --- src/corelib/kernel/qcoreapplication_p.h | 1 + src/corelib/kernel/qobject_p.h | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/src/corelib/kernel/qcoreapplication_p.h b/src/corelib/kernel/qcoreapplication_p.h index 2d4e8cdf8d..cfd40306c7 100644 --- a/src/corelib/kernel/qcoreapplication_p.h +++ b/src/corelib/kernel/qcoreapplication_p.h @@ -19,6 +19,7 @@ #if QT_CONFIG(commandlineparser) #include "QtCore/qcommandlineoption.h" #endif +#include "QtCore/qreadwritelock.h" #include "QtCore/qtranslator.h" #if QT_CONFIG(settings) #include "QtCore/qsettings.h" diff --git a/src/corelib/kernel/qobject_p.h b/src/corelib/kernel/qobject_p.h index 52f18f52a3..3f55fba6b0 100644 --- a/src/corelib/kernel/qobject_p.h +++ b/src/corelib/kernel/qobject_p.h @@ -21,7 +21,6 @@ #include "QtCore/qlist.h" #include "QtCore/qobject.h" #include "QtCore/qpointer.h" -#include "QtCore/qreadwritelock.h" #include "QtCore/qsharedpointer.h" #include "QtCore/qvariant.h" #include "QtCore/qproperty.h" -- cgit v1.2.3