From fb0c7a9956824fbc3e3a3ab70cf7e2e5a622e85d Mon Sep 17 00:00:00 2001 From: Fabian Kosmale Date: Sun, 6 Feb 2022 20:09:54 +0100 Subject: QVariant: reduce transitive includes Forward declare more types in qvariant.h, and do the same for qdebug.h (which will be removed from qvariant in a separate patch). As we now only forward declare containers (e.g. QMap, QList, ...), code which includes , ... breaks without further adjustment: So far, those headers simply included qvariant.h. However, by introducing new actual headers for those types and adjusting sync.profile, we can avoid this issue. To avoid breaking leaf modules and user code, we make the change opt-in: Unless QT_LEAN_HEADERS is defined to a value of >= 1, we still include the superfluous headers. We also set this macro in qtbase via QT_EXTRA_INTERNAL_TARGET_DEFINES. [ChangeLog][Potentially Source-Incompatible Changes] qvariant.h no longer includes , , , , and . Code that relied on transitive includes might need to explicitly include those headers now. Notably, including (or qvariant.h) is no longer sufficient when using QVariant(List|Map|Hash). Using them now requires including respectively , , or . Alternatively, including and the , or header also works. [ChangeLog][Potentially Source-Incompatible Changes] qdebug.h no longer includes , , and . Code that relied on transitive includes might need to explicitly include those headers now. Task-number: QTBUG-97601 Change-Id: I142e5de709ed0b305716369a3266389ab7fbbb71 Reviewed-by: Thiago Macieira Reviewed-by: Marc Mutz --- sync.profile | 1 - 1 file changed, 1 deletion(-) (limited to 'sync.profile') diff --git a/sync.profile b/sync.profile index 83fab8ffe0..70f652ecf4 100644 --- a/sync.profile +++ b/sync.profile @@ -51,7 +51,6 @@ "qevent.h" => "QtEvents", "qnamespace.h" => "Qt", "qnumeric.h" => "QtNumeric", - "qvariant.h" => "QVariantHash,QVariantList,QVariantMap", "qvulkanfunctions.h" => "QVulkanFunctions,QVulkanDeviceFunctions", "qgl.h" => "QGL", "qtsqlglobal.h" => "QSql", -- cgit v1.2.3