From e124ad54b8c1944435e7a26efb109dc0ca3a07e5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor=20Arne=20Vestb=C3=B8?= Date: Fri, 17 Apr 2015 15:08:21 +0200 Subject: Allow RESOURCES to contain standalone files and collections of files MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Standalone files are added by using RESOURCES += file.txt, while collections of files are defined as collection.files = f1.txt f2.txt and then added using RESOURCES += collection. For collections a prefix can also be set using collection.prefix = /foo. The standalone files are not prefixed. Change-Id: I8236808238414da05e744f799a1bb15a72f4a46f Reviewed-by: Tor Arne Vestbø --- tests/auto/tools/qmake/testdata/resources/main.cpp | 42 ++++++++++++++++++++++ .../tools/qmake/testdata/resources/resources.pro | 10 ++++++ .../tools/qmake/testdata/resources/subdir/file.txt | 0 tests/auto/tools/qmake/testdata/resources/test.qrc | 5 +++ 4 files changed, 57 insertions(+) create mode 100644 tests/auto/tools/qmake/testdata/resources/main.cpp create mode 100644 tests/auto/tools/qmake/testdata/resources/resources.pro create mode 100644 tests/auto/tools/qmake/testdata/resources/subdir/file.txt create mode 100644 tests/auto/tools/qmake/testdata/resources/test.qrc (limited to 'tests/auto/tools/qmake/testdata') diff --git a/tests/auto/tools/qmake/testdata/resources/main.cpp b/tests/auto/tools/qmake/testdata/resources/main.cpp new file mode 100644 index 0000000000..78f9814396 --- /dev/null +++ b/tests/auto/tools/qmake/testdata/resources/main.cpp @@ -0,0 +1,42 @@ +/**************************************************************************** +** +** Copyright (C) 2015 The Qt Company Ltd. +** Contact: http://www.qt.io/licensing/ +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL21$ +** 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 http://www.qt.io/terms-conditions. For further +** information use the contact form at http://www.qt.io/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 or version 3 as published by the Free +** Software Foundation and appearing in the file LICENSE.LGPLv21 and +** LICENSE.LGPLv3 included in the packaging of this file. Please review the +** following information to ensure the GNU Lesser General Public License +** requirements will be met: https://www.gnu.org/licenses/lgpl.html and +** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** As a special exception, The Qt Company gives you certain additional +** rights. These rights are described in The Qt Company LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + + + +#include + +int main( int argc, char **argv ) +{ + QGuiApplication a( argc, argv ); + return a.exec(); +} diff --git a/tests/auto/tools/qmake/testdata/resources/resources.pro b/tests/auto/tools/qmake/testdata/resources/resources.pro new file mode 100644 index 0000000000..f024fe5617 --- /dev/null +++ b/tests/auto/tools/qmake/testdata/resources/resources.pro @@ -0,0 +1,10 @@ +TEMPLATE = app +SOURCES = main.cpp + +pro_file.files = resources.pro +pro_file.prefix = /prefix + +subdir.files = subdir/file.txt +subdir.base = subdir + +RESOURCES = test.qrc main.cpp pro_file subdir diff --git a/tests/auto/tools/qmake/testdata/resources/subdir/file.txt b/tests/auto/tools/qmake/testdata/resources/subdir/file.txt new file mode 100644 index 0000000000..e69de29bb2 diff --git a/tests/auto/tools/qmake/testdata/resources/test.qrc b/tests/auto/tools/qmake/testdata/resources/test.qrc new file mode 100644 index 0000000000..decde3dd24 --- /dev/null +++ b/tests/auto/tools/qmake/testdata/resources/test.qrc @@ -0,0 +1,5 @@ + + + test.qrc + + -- cgit v1.2.3