diff options
Diffstat (limited to 'tests/manual/embeddedintoforeignwindow')
-rw-r--r-- | tests/manual/embeddedintoforeignwindow/CMakeLists.txt | 26 | ||||
-rw-r--r-- | tests/manual/embeddedintoforeignwindow/itemwindow.cpp | 31 | ||||
-rw-r--r-- | tests/manual/embeddedintoforeignwindow/itemwindow.h | 32 | ||||
-rw-r--r-- | tests/manual/embeddedintoforeignwindow/main.cpp | 31 |
4 files changed, 24 insertions, 96 deletions
diff --git a/tests/manual/embeddedintoforeignwindow/CMakeLists.txt b/tests/manual/embeddedintoforeignwindow/CMakeLists.txt index 06fee7d482..a80206133b 100644 --- a/tests/manual/embeddedintoforeignwindow/CMakeLists.txt +++ b/tests/manual/embeddedintoforeignwindow/CMakeLists.txt @@ -1,10 +1,11 @@ -# Generated from embeddedintoforeignwindow.pro. +# Copyright (C) 2022 The Qt Company Ltd. +# SPDX-License-Identifier: BSD-3-Clause ##################################################################### ## embeddedintoforeignwindow Binary: ##################################################################### -qt_add_manual_test(embeddedintoforeignwindow +qt_internal_add_manual_test(embeddedintoforeignwindow SOURCES ../diaglib/eventfilter.cpp ../diaglib/eventfilter.h ../diaglib/nativewindowdump.h @@ -12,47 +13,46 @@ qt_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_extend_target(embeddedintoforeignwindow CONDITION WIN32 +qt_internal_extend_target(embeddedintoforeignwindow CONDITION WIN32 SOURCES ../diaglib/nativewindowdump_win.cpp - PUBLIC_LIBRARIES + LIBRARIES user32 ) -qt_extend_target(embeddedintoforeignwindow CONDITION UNIX +qt_internal_extend_target(embeddedintoforeignwindow CONDITION UNIX SOURCES ../diaglib/nativewindowdump.cpp ) -qt_extend_target(embeddedintoforeignwindow CONDITION QT_FEATURE_widgets +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 - PUBLIC_LIBRARIES + LIBRARIES Qt::WidgetsPrivate ) -qt_extend_target(embeddedintoforeignwindow CONDITION QT_FEATURE_opengl +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 c8e8a4f1b5..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" @@ -166,7 +141,7 @@ public: pos.rx() += buttonSize.width() + spacing; ButtonItem *qi = new ButtonItem("Quit", QRect(pos, buttonSize), QColor(Qt::red).lighter(), this); - qi->setShortcut(Qt::CTRL + Qt::Key_Q); + qi->setShortcut(Qt::CTRL | Qt::Key_Q); connect(qi, &ButtonItem::clicked, qApp, &QCoreApplication::quit); addItem(qi); |