11d6932560
The density of Q_FOREACH uses in this and some other modules is still extremely high, too high for anyone to tackle in a short amount of time. Even if they're not concentrated in just a few TUs, we need to make progress on a global QT_NO_FOREACH default, so grab the nettle and stick to our strategy: Mark the whole of Qt 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. For TUs that 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). In tst_qglobal.cpp and tst_qcollections.cpp change the comment on the #undef QT_NO_FOREACH to indicate that these actually test the macro. Task-number: QTBUG-115839 Change-Id: Iecc444eb7d43d7e4d037f6e155abe0e14a00a5d6 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
59 lines
1.7 KiB
CMake
59 lines
1.7 KiB
CMake
# Copyright (C) 2022 The Qt Company Ltd.
|
|
# SPDX-License-Identifier: BSD-3-Clause
|
|
|
|
#####################################################################
|
|
## embeddedintoforeignwindow Binary:
|
|
#####################################################################
|
|
|
|
qt_internal_add_manual_test(embeddedintoforeignwindow
|
|
SOURCES
|
|
../diaglib/eventfilter.cpp ../diaglib/eventfilter.h
|
|
../diaglib/nativewindowdump.h
|
|
../diaglib/qwindowdump.cpp ../diaglib/qwindowdump.h
|
|
../diaglib/textdump.cpp ../diaglib/textdump.h
|
|
itemwindow.cpp itemwindow.h
|
|
main.cpp
|
|
NO_PCH_SOURCES
|
|
itemwindow.cpp # undef QT_NO_FOREACH
|
|
DEFINES
|
|
QT_DIAG_LIB
|
|
INCLUDE_DIRECTORIES
|
|
../diaglib
|
|
LIBRARIES
|
|
Qt::CorePrivate
|
|
Qt::Gui
|
|
Qt::GuiPrivate
|
|
)
|
|
|
|
## Scopes:
|
|
#####################################################################
|
|
|
|
qt_internal_extend_target(embeddedintoforeignwindow CONDITION WIN32
|
|
SOURCES
|
|
../diaglib/nativewindowdump_win.cpp
|
|
LIBRARIES
|
|
user32
|
|
)
|
|
|
|
qt_internal_extend_target(embeddedintoforeignwindow CONDITION UNIX
|
|
SOURCES
|
|
../diaglib/nativewindowdump.cpp
|
|
)
|
|
|
|
qt_internal_extend_target(embeddedintoforeignwindow CONDITION QT_FEATURE_widgets
|
|
SOURCES
|
|
../diaglib/debugproxystyle.cpp ../diaglib/debugproxystyle.h
|
|
../diaglib/logwidget.cpp ../diaglib/logwidget.h
|
|
../diaglib/qwidgetdump.cpp ../diaglib/qwidgetdump.h
|
|
LIBRARIES
|
|
Qt::WidgetsPrivate
|
|
)
|
|
|
|
qt_internal_extend_target(embeddedintoforeignwindow CONDITION QT_FEATURE_opengl
|
|
SOURCES
|
|
../diaglib/glinfo.cpp ../diaglib/glinfo.h
|
|
LIBRARIES
|
|
Qt::OpenGL
|
|
Qt::OpenGLWidgets
|
|
)
|