From a4d968adc05055be0000dc55a5a7f3889b06e676 Mon Sep 17 00:00:00 2001 From: Marc Mutz Date: Mon, 7 Aug 2023 17:42:52 +0200 Subject: Mark ios plugin as free of Q_FOREACH, except where it isn't MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The density of Q_FOREACH uses is high here, too high for this author to tackle in a short amount of time. But they're concentrated in just a few TUs, so pick a different strategy: Mark the whole plugin with QT_NO_FOREACH, to prevent new uses from creeping in, and whitelist the affected TUs by #undef'ing QT_NO_FOREACH locally, at the top of each file. Since the TUs are part of a larger executable, this requires these files to be compiled separately, so add them to NO_PCH_SOURCES (which implies NO_UNITY_BUILD_SOURCES, too). I'm aware that Objective-C/C++ files are currently probably implicitly NO_PCH_SOURCES, but don't rely on that. Task-number: QTBUG-115839 Change-Id: If451501f3cb7cc3a182854a94bc5d27c907f6161 Reviewed-by: Tor Arne Vestbø --- src/plugins/platforms/ios/qiosintegration.mm | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/plugins/platforms/ios/qiosintegration.mm') diff --git a/src/plugins/platforms/ios/qiosintegration.mm b/src/plugins/platforms/ios/qiosintegration.mm index 27d0f7f2ba..44aeaabec2 100644 --- a/src/plugins/platforms/ios/qiosintegration.mm +++ b/src/plugins/platforms/ios/qiosintegration.mm @@ -1,6 +1,8 @@ // Copyright (C) 2016 The Qt Company Ltd. // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only +#undef QT_NO_FOREACH // this file contains unported legacy Q_FOREACH uses + #include "qiosintegration.h" #include "qioseventdispatcher.h" #include "qiosglobal.h" -- cgit v1.2.3