summaryrefslogtreecommitdiffstats
path: root/tests/manual/embeddedintoforeignwindow
diff options
context:
space:
mode:
Diffstat (limited to 'tests/manual/embeddedintoforeignwindow')
-rw-r--r--tests/manual/embeddedintoforeignwindow/CMakeLists.txt16
-rw-r--r--tests/manual/embeddedintoforeignwindow/itemwindow.cpp31
-rw-r--r--tests/manual/embeddedintoforeignwindow/itemwindow.h32
-rw-r--r--tests/manual/embeddedintoforeignwindow/main.cpp29
4 files changed, 18 insertions, 90 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 15edc88325..422e699afc 100644
--- a/tests/manual/embeddedintoforeignwindow/itemwindow.cpp
+++ b/tests/manual/embeddedintoforeignwindow/itemwindow.cpp
@@ -1,30 +1,7 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the test suite of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL-EXCEPT$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 as published by the Free Software
-** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2017 The Qt Company Ltd.
+// 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 096051061a..a8db113761 100644
--- a/tests/manual/embeddedintoforeignwindow/itemwindow.h
+++ b/tests/manual/embeddedintoforeignwindow/itemwindow.h
@@ -1,30 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the test suite of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL-EXCEPT$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 as published by the Free Software
-** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2017 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
#ifndef ITEMWINDOW_H
#define ITEMWINDOW_H
@@ -90,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 c63eeae023..cadd9a3bec 100644
--- a/tests/manual/embeddedintoforeignwindow/main.cpp
+++ b/tests/manual/embeddedintoforeignwindow/main.cpp
@@ -1,30 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the test suite of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL-EXCEPT$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 as published by the Free Software
-** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2017 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
#include "itemwindow.h"