diff options
Diffstat (limited to 'tests/manual/embeddedintoforeignwindow')
4 files changed, 15 insertions, 12 deletions
diff --git a/tests/manual/embeddedintoforeignwindow/CMakeLists.txt b/tests/manual/embeddedintoforeignwindow/CMakeLists.txt index 84ce8b4daa..a80206133b 100644 --- a/tests/manual/embeddedintoforeignwindow/CMakeLists.txt +++ b/tests/manual/embeddedintoforeignwindow/CMakeLists.txt @@ -1,4 +1,5 @@ -# Generated from embeddedintoforeignwindow.pro. +# Copyright (C) 2022 The Qt Company Ltd. +# SPDX-License-Identifier: BSD-3-Clause ##################################################################### ## embeddedintoforeignwindow Binary: @@ -12,26 +13,25 @@ qt_internal_add_manual_test(embeddedintoforeignwindow ../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 - PUBLIC_LIBRARIES + LIBRARIES Qt::CorePrivate Qt::Gui Qt::GuiPrivate ) -#### Keys ignored in scope 1:.:.:embeddedintoforeignwindow.pro:<TRUE>: -# TEMPLATE = "app" - ## Scopes: ##################################################################### qt_internal_extend_target(embeddedintoforeignwindow CONDITION WIN32 SOURCES ../diaglib/nativewindowdump_win.cpp - PUBLIC_LIBRARIES + LIBRARIES user32 ) @@ -45,14 +45,14 @@ qt_internal_extend_target(embeddedintoforeignwindow CONDITION QT_FEATURE_widgets ../diaglib/debugproxystyle.cpp ../diaglib/debugproxystyle.h ../diaglib/logwidget.cpp ../diaglib/logwidget.h ../diaglib/qwidgetdump.cpp ../diaglib/qwidgetdump.h - PUBLIC_LIBRARIES + LIBRARIES Qt::WidgetsPrivate ) qt_internal_extend_target(embeddedintoforeignwindow CONDITION QT_FEATURE_opengl SOURCES ../diaglib/glinfo.cpp ../diaglib/glinfo.h - PUBLIC_LIBRARIES + LIBRARIES Qt::OpenGL Qt::OpenGLWidgets ) diff --git a/tests/manual/embeddedintoforeignwindow/itemwindow.cpp b/tests/manual/embeddedintoforeignwindow/itemwindow.cpp index 143cdea402..422e699afc 100644 --- a/tests/manual/embeddedintoforeignwindow/itemwindow.cpp +++ b/tests/manual/embeddedintoforeignwindow/itemwindow.cpp @@ -1,5 +1,7 @@ // Copyright (C) 2017 The Qt Company Ltd. -// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only + +#undef QT_NO_FOREACH // this file contains unported legacy Q_FOREACH uses #include "itemwindow.h" diff --git a/tests/manual/embeddedintoforeignwindow/itemwindow.h b/tests/manual/embeddedintoforeignwindow/itemwindow.h index a0e11ae1c0..a8db113761 100644 --- a/tests/manual/embeddedintoforeignwindow/itemwindow.h +++ b/tests/manual/embeddedintoforeignwindow/itemwindow.h @@ -1,5 +1,5 @@ // Copyright (C) 2017 The Qt Company Ltd. -// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only #ifndef ITEMWINDOW_H #define ITEMWINDOW_H @@ -65,7 +65,8 @@ private: #define PROPAGATE_EVENT(windowHandler, eventClass, itemHandler) \ void windowHandler(eventClass *e) override \ { \ - foreach (Item *i, m_items) \ + const auto copy = m_items; /* needed? */ \ + for (Item *i : copy) \ i->itemHandler(e); \ } diff --git a/tests/manual/embeddedintoforeignwindow/main.cpp b/tests/manual/embeddedintoforeignwindow/main.cpp index d87962e6b5..cadd9a3bec 100644 --- a/tests/manual/embeddedintoforeignwindow/main.cpp +++ b/tests/manual/embeddedintoforeignwindow/main.cpp @@ -1,5 +1,5 @@ // Copyright (C) 2017 The Qt Company Ltd. -// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only #include "itemwindow.h" |