diff options
Diffstat (limited to 'tests/auto/cmake/test_add_big_resource')
5 files changed, 19 insertions, 57 deletions
diff --git a/tests/auto/cmake/test_add_big_resource/CMakeLists.txt b/tests/auto/cmake/test_add_big_resource/CMakeLists.txt index f9014aac06..bee8472475 100644 --- a/tests/auto/cmake/test_add_big_resource/CMakeLists.txt +++ b/tests/auto/cmake/test_add_big_resource/CMakeLists.txt @@ -1,13 +1,19 @@ +# Copyright (C) 2022 The Qt Company Ltd. +# SPDX-License-Identifier: BSD-3-Clause -cmake_minimum_required(VERSION 3.14) +cmake_minimum_required(VERSION 3.16) project(test_add_big_resource) +# Make sure that AUTOMOC does not interfere with qt_add_big_resources +set(CMAKE_AUTOMOC ON) + find_package(Qt6Core REQUIRED) qt_wrap_cpp(moc_files myobject.h) -qt_add_big_resources(rcc_files "test_add_big_resource.qrc" "test_add_big_resource2.qrc") +qt_add_big_resources(rcc_files "test_add_big_resource.qrc" "test_add_big_resource2.qrc" + "subdir/test_add_big_resource.qrc") add_executable(myobject myobject.cpp ${moc_files} ${rcc_files}) target_link_libraries(myobject PRIVATE Qt::Core) diff --git a/tests/auto/cmake/test_add_big_resource/myobject.cpp b/tests/auto/cmake/test_add_big_resource/myobject.cpp index 5d320b8592..34c2ccc6bf 100644 --- a/tests/auto/cmake/test_add_big_resource/myobject.cpp +++ b/tests/auto/cmake/test_add_big_resource/myobject.cpp @@ -1,30 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2011 Klarälvdalens Datakonsult AB, a KDAB Group company, info@kdab.com, author Stephen Kelly <stephen.kelly@kdab.com> -** 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) 2011 Klarälvdalens Datakonsult AB, a KDAB Group company, info@kdab.com, author Stephen Kelly <stephen.kelly@kdab.com> +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only #include "myobject.h" diff --git a/tests/auto/cmake/test_add_big_resource/myobject.h b/tests/auto/cmake/test_add_big_resource/myobject.h index b6fbce32cd..87d7bfa3df 100644 --- a/tests/auto/cmake/test_add_big_resource/myobject.h +++ b/tests/auto/cmake/test_add_big_resource/myobject.h @@ -1,30 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2011 Klarälvdalens Datakonsult AB, a KDAB Group company, info@kdab.com, author Stephen Kelly <stephen.kelly@kdab.com> -** 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) 2011 Klarälvdalens Datakonsult AB, a KDAB Group company, info@kdab.com, author Stephen Kelly <stephen.kelly@kdab.com> +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only #ifndef MYOBJECT_H #define MYOBJECT_H @@ -35,7 +10,7 @@ class MyObject : public QObject { Q_OBJECT public: - MyObject(QObject *parent = 0); + MyObject(QObject *parent = nullptr); signals: void someSignal(); diff --git a/tests/auto/cmake/test_add_big_resource/subdir/subdir_resource_file.txt b/tests/auto/cmake/test_add_big_resource/subdir/subdir_resource_file.txt new file mode 100644 index 0000000000..2c604a4f18 --- /dev/null +++ b/tests/auto/cmake/test_add_big_resource/subdir/subdir_resource_file.txt @@ -0,0 +1 @@ +Ken sent me. diff --git a/tests/auto/cmake/test_add_big_resource/subdir/test_add_big_resource.qrc b/tests/auto/cmake/test_add_big_resource/subdir/test_add_big_resource.qrc new file mode 100644 index 0000000000..9bf4f19823 --- /dev/null +++ b/tests/auto/cmake/test_add_big_resource/subdir/test_add_big_resource.qrc @@ -0,0 +1,5 @@ +<!DOCTYPE RCC><RCC version="1.0"> +<qresource prefix="/"> + <file>subdir_resource_file.txt</file> +</qresource> +</RCC> |