summaryrefslogtreecommitdiff
path: root/tests/auto/qml/resources
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/qml/resources')
-rw-r--r--tests/auto/qml/resources/CMakeLists.txt37
-rw-r--r--tests/auto/qml/resources/am-config.yaml22
-rw-r--r--tests/auto/qml/resources/appcommon/CMakeLists.txt2
-rw-r--r--tests/auto/qml/resources/appcommon/Quicklaunch.qml36
-rw-r--r--tests/auto/qml/resources/appcommon/appcommon.pro7
-rw-r--r--tests/auto/qml/resources/appcommon/appcommonfile.qrc7
-rw-r--r--tests/auto/qml/resources/appcommon/qml/common/CommonObj.qml35
-rw-r--r--tests/auto/qml/resources/appcommon/qml/common/qmldir2
-rw-r--r--tests/auto/qml/resources/apps/app1/CMakeLists.txt32
-rw-r--r--tests/auto/qml/resources/apps/app1/app1.pro11
-rw-r--r--tests/auto/qml/resources/apps/app1/app1.qml39
-rw-r--r--tests/auto/qml/resources/apps/app1/app1file.qrc7
-rw-r--r--tests/auto/qml/resources/apps/app1/app1plugin.qrc5
-rw-r--r--tests/auto/qml/resources/apps/app1/icon.pngbin0 -> 1486 bytes
-rw-r--r--tests/auto/qml/resources/apps/app1/info.yaml17
-rw-r--r--tests/auto/qml/resources/apps/app1/qml/forms/AquaRect.qml35
-rw-r--r--tests/auto/qml/resources/apps/app1/qml/forms/YellowRect.qml35
-rw-r--r--tests/auto/qml/resources/apps/app1/qml/forms/qmldir4
-rw-r--r--tests/auto/qml/resources/apps/app2/BlueRect.qml35
-rw-r--r--tests/auto/qml/resources/apps/app2/CMakeLists.txt2
-rw-r--r--tests/auto/qml/resources/apps/app2/app2.pro8
-rw-r--r--tests/auto/qml/resources/apps/app2/app2.qml46
-rw-r--r--tests/auto/qml/resources/apps/app2/app2.qrc6
-rw-r--r--tests/auto/qml/resources/apps/app2/icon.pngbin0 -> 1486 bytes
-rw-r--r--tests/auto/qml/resources/apps/app2/info.yaml15
-rw-r--r--tests/auto/qml/resources/apps/app2/qml/appwidgets/GreenRect.qml35
-rw-r--r--tests/auto/qml/resources/apps/app2/qml/appwidgets/qmldir2
-rw-r--r--tests/auto/qml/resources/qml/widgets/MagentaRect.qml35
-rw-r--r--tests/auto/qml/resources/qml/widgets/RedRect.qml35
-rw-r--r--tests/auto/qml/resources/qml/widgets/qmldir3
-rw-r--r--tests/auto/qml/resources/relative/elements/LinenRect.qml35
-rw-r--r--tests/auto/qml/resources/relative/elements/qmldir2
-rw-r--r--tests/auto/qml/resources/resources.pro5
-rw-r--r--tests/auto/qml/resources/systemuifile.qrc6
-rw-r--r--tests/auto/qml/resources/systemuiplugin.qrc5
-rw-r--r--tests/auto/qml/resources/test.pro18
-rw-r--r--tests/auto/qml/resources/tst_resource.qml81
37 files changed, 707 insertions, 0 deletions
diff --git a/tests/auto/qml/resources/CMakeLists.txt b/tests/auto/qml/resources/CMakeLists.txt
new file mode 100644
index 00000000..0893a7ac
--- /dev/null
+++ b/tests/auto/qml/resources/CMakeLists.txt
@@ -0,0 +1,37 @@
+# Generated from resources.pro.
+
+#####################################################################
+## systemuiplugin Generic Library:
+#####################################################################
+
+qt_internal_add_cmake_library(systemuiplugin
+ MODULE
+ OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}"
+)
+
+# Resources:
+set(systemuiplugin_resource_files
+ "qml/widgets/MagentaRect.qml"
+)
+
+qt_internal_add_resource(systemuiplugin "systemuiplugin"
+ PREFIX
+ "/"
+ FILES
+ ${systemuiplugin_resource_files}
+)
+
+
+#### Keys ignored in scope 2:.:.:test.pro:<TRUE>:
+# AM_CONFIG = "am-config.yaml"
+# DIRECTORIES = "apps/app2/qml" "relative"
+# FILES = "am-config.yaml" "apps/app1/icon.png" "apps/app1/info.yaml" "apps/app2/icon.png" "apps/app2/info.yaml"
+# RESOURCE_SOURCE = "systemuifile.qrc"
+# TEMPLATE = "lib"
+# TEST_APPS = "app1" "app2"
+# TEST_FILES = "tst_resource.qml"
+
+qt_autogen_tools_initial_setup(systemuiplugin)
+add_subdirectory(appcommon)
+add_subdirectory(apps/app1)
+add_subdirectory(apps/app2)
diff --git a/tests/auto/qml/resources/am-config.yaml b/tests/auto/qml/resources/am-config.yaml
new file mode 100644
index 00000000..a06cb076
--- /dev/null
+++ b/tests/auto/qml/resources/am-config.yaml
@@ -0,0 +1,22 @@
+formatVersion: 1
+formatType: am-configuration
+---
+applications:
+ builtinAppsManifestDir: "${CONFIG_PWD}/apps"
+ installationDir: "/tmp/am-resource-test/apps"
+
+quicklaunch:
+ runtimesPerContainer: 1
+ idleLoad: 1.0
+
+runtimes:
+ qml:
+ resources: "appcommon/appcommonfile.rcc"
+ importPaths: [ "qrc:/appcommon/qml", "relative" ]
+ quicklaunchQml: "qrc:/appcommon/Quicklaunch.qml"
+
+ui:
+ importPaths: "qrc:///qml"
+ resources:
+ - "systemuifile.rcc"
+ - "${CONFIG_PWD}/systemuiplugin" # libsystemuiplugin.so would only work on Linux
diff --git a/tests/auto/qml/resources/appcommon/CMakeLists.txt b/tests/auto/qml/resources/appcommon/CMakeLists.txt
new file mode 100644
index 00000000..45d12696
--- /dev/null
+++ b/tests/auto/qml/resources/appcommon/CMakeLists.txt
@@ -0,0 +1,2 @@
+# Generated from appcommon.pro.
+
diff --git a/tests/auto/qml/resources/appcommon/Quicklaunch.qml b/tests/auto/qml/resources/appcommon/Quicklaunch.qml
new file mode 100644
index 00000000..e9cc4144
--- /dev/null
+++ b/tests/auto/qml/resources/appcommon/Quicklaunch.qml
@@ -0,0 +1,36 @@
+/****************************************************************************
+**
+** Copyright (C) 2021 The Qt Company Ltd.
+** Copyright (C) 2019 Luxoft Sweden AB
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the QtApplicationManager module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:GPL$
+** 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 or (at your option) any later version
+** approved by the KDE Free Qt Foundation. The licenses are as published by
+** the Free Software Foundation and appearing in the file LICENSE.GPL3
+** 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$
+**
+****************************************************************************/
+
+import QtQuick 2.11
+import common 1.0
+
+CommonObj {
+ Component.onCompleted: console.info("Quicklaunch - meaning: " + meaning);
+}
diff --git a/tests/auto/qml/resources/appcommon/appcommon.pro b/tests/auto/qml/resources/appcommon/appcommon.pro
new file mode 100644
index 00000000..47028775
--- /dev/null
+++ b/tests/auto/qml/resources/appcommon/appcommon.pro
@@ -0,0 +1,7 @@
+TEMPLATE = aux
+
+OTHER_FILES += Quicklaunch.qml \
+ qml/common/CommonObj.qml
+
+RESOURCE_SOURCE = appcommonfile.qrc
+load(generate-resource)
diff --git a/tests/auto/qml/resources/appcommon/appcommonfile.qrc b/tests/auto/qml/resources/appcommon/appcommonfile.qrc
new file mode 100644
index 00000000..4dc15f85
--- /dev/null
+++ b/tests/auto/qml/resources/appcommon/appcommonfile.qrc
@@ -0,0 +1,7 @@
+<!DOCTYPE RCC><RCC version="1.0">
+<qresource prefix="appcommon">
+ <file>qml/common/CommonObj.qml</file>
+ <file>qml/common/qmldir</file>
+ <file>Quicklaunch.qml</file>
+</qresource>
+</RCC>
diff --git a/tests/auto/qml/resources/appcommon/qml/common/CommonObj.qml b/tests/auto/qml/resources/appcommon/qml/common/CommonObj.qml
new file mode 100644
index 00000000..1b181488
--- /dev/null
+++ b/tests/auto/qml/resources/appcommon/qml/common/CommonObj.qml
@@ -0,0 +1,35 @@
+/****************************************************************************
+**
+** Copyright (C) 2021 The Qt Company Ltd.
+** Copyright (C) 2019 Luxoft Sweden AB
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the QtApplicationManager module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:GPL$
+** 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 or (at your option) any later version
+** approved by the KDE Free Qt Foundation. The licenses are as published by
+** the Free Software Foundation and appearing in the file LICENSE.GPL3
+** 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$
+**
+****************************************************************************/
+
+import QtQuick 2.11
+
+QtObject {
+ property int meaning: 42
+}
diff --git a/tests/auto/qml/resources/appcommon/qml/common/qmldir b/tests/auto/qml/resources/appcommon/qml/common/qmldir
new file mode 100644
index 00000000..5458b257
--- /dev/null
+++ b/tests/auto/qml/resources/appcommon/qml/common/qmldir
@@ -0,0 +1,2 @@
+module common
+CommonObj 1.0 CommonObj.qml
diff --git a/tests/auto/qml/resources/apps/app1/CMakeLists.txt b/tests/auto/qml/resources/apps/app1/CMakeLists.txt
new file mode 100644
index 00000000..7ff28b4a
--- /dev/null
+++ b/tests/auto/qml/resources/apps/app1/CMakeLists.txt
@@ -0,0 +1,32 @@
+# Generated from app1.pro.
+
+#####################################################################
+## app1plugin Generic Library:
+#####################################################################
+
+qt_internal_add_cmake_library(app1plugin
+ MODULE
+ PUBLIC_LIBRARIES
+ Qt::Core
+ Qt::Gui
+)
+
+# Resources:
+set(app1plugin_resource_files
+ "qml/forms/AquaRect.qml"
+)
+
+qt_internal_add_resource(app1plugin "app1plugin"
+ PREFIX
+ "/app1"
+ FILES
+ ${app1plugin_resource_files}
+)
+
+
+#### Keys ignored in scope 1:.:.:app1.pro:<TRUE>:
+# OTHER_FILES = "info.yaml" "icon.png"
+# RESOURCE_SOURCE = "app1file.qrc"
+# TEMPLATE = "lib"
+
+qt_autogen_tools_initial_setup(app1plugin)
diff --git a/tests/auto/qml/resources/apps/app1/app1.pro b/tests/auto/qml/resources/apps/app1/app1.pro
new file mode 100644
index 00000000..cbbb4758
--- /dev/null
+++ b/tests/auto/qml/resources/apps/app1/app1.pro
@@ -0,0 +1,11 @@
+TEMPLATE = lib
+TARGET = app1plugin
+CONFIG += plugin
+RESOURCES = app1plugin.qrc
+
+RESOURCE_SOURCE = app1file.qrc
+load(generate-resource)
+
+OTHER_FILES += \
+ info.yaml \
+ icon.png
diff --git a/tests/auto/qml/resources/apps/app1/app1.qml b/tests/auto/qml/resources/apps/app1/app1.qml
new file mode 100644
index 00000000..d519f3ac
--- /dev/null
+++ b/tests/auto/qml/resources/apps/app1/app1.qml
@@ -0,0 +1,39 @@
+/****************************************************************************
+**
+** Copyright (C) 2021 The Qt Company Ltd.
+** Copyright (C) 2019 Luxoft Sweden AB
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the QtApplicationManager module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:GPL$
+** 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 or (at your option) any later version
+** approved by the KDE Free Qt Foundation. The licenses are as published by
+** the Free Software Foundation and appearing in the file LICENSE.GPL3
+** 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$
+**
+****************************************************************************/
+
+import QtApplicationManager.Application 2.0
+import forms 1.0
+import elements 1.0
+
+ApplicationManagerWindow {
+ YellowRect {}
+ AquaRect {}
+ LinenRect {}
+}
diff --git a/tests/auto/qml/resources/apps/app1/app1file.qrc b/tests/auto/qml/resources/apps/app1/app1file.qrc
new file mode 100644
index 00000000..6c958e89
--- /dev/null
+++ b/tests/auto/qml/resources/apps/app1/app1file.qrc
@@ -0,0 +1,7 @@
+<!DOCTYPE RCC><RCC version="1.0">
+<qresource prefix="/app1">
+ <file>app1.qml</file>
+ <file>qml/forms/YellowRect.qml</file>
+ <file>qml/forms/qmldir</file>
+</qresource>
+</RCC>
diff --git a/tests/auto/qml/resources/apps/app1/app1plugin.qrc b/tests/auto/qml/resources/apps/app1/app1plugin.qrc
new file mode 100644
index 00000000..6c4e2ae3
--- /dev/null
+++ b/tests/auto/qml/resources/apps/app1/app1plugin.qrc
@@ -0,0 +1,5 @@
+<!DOCTYPE RCC><RCC version="1.0">
+<qresource prefix="/app1">
+ <file>qml/forms/AquaRect.qml</file>
+</qresource>
+</RCC>
diff --git a/tests/auto/qml/resources/apps/app1/icon.png b/tests/auto/qml/resources/apps/app1/icon.png
new file mode 100644
index 00000000..c1397153
--- /dev/null
+++ b/tests/auto/qml/resources/apps/app1/icon.png
Binary files differ
diff --git a/tests/auto/qml/resources/apps/app1/info.yaml b/tests/auto/qml/resources/apps/app1/info.yaml
new file mode 100644
index 00000000..a5287f2c
--- /dev/null
+++ b/tests/auto/qml/resources/apps/app1/info.yaml
@@ -0,0 +1,17 @@
+formatVersion: 1
+formatType: am-package
+---
+id: 'app1'
+icon: 'icon.png'
+name:
+ en: 'Resource Test App 1'
+
+applications:
+ - id: 'app1'
+ code: 'qrc:///app1/app1.qml'
+ runtime: 'qml'
+ runtimeParameters:
+ importPaths: "qrc:///app1/qml"
+ resources:
+ - app1file.rcc
+ - app1plugin # libapp1plugin.so would only work on Linux
diff --git a/tests/auto/qml/resources/apps/app1/qml/forms/AquaRect.qml b/tests/auto/qml/resources/apps/app1/qml/forms/AquaRect.qml
new file mode 100644
index 00000000..cefb485c
--- /dev/null
+++ b/tests/auto/qml/resources/apps/app1/qml/forms/AquaRect.qml
@@ -0,0 +1,35 @@
+/****************************************************************************
+**
+** Copyright (C) 2021 The Qt Company Ltd.
+** Copyright (C) 2019 Luxoft Sweden AB
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the QtApplicationManager module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:GPL$
+** 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 or (at your option) any later version
+** approved by the KDE Free Qt Foundation. The licenses are as published by
+** the Free Software Foundation and appearing in the file LICENSE.GPL3
+** 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$
+**
+****************************************************************************/
+
+import QtQuick 2.11
+
+Rectangle {
+ color: "aqua"
+}
diff --git a/tests/auto/qml/resources/apps/app1/qml/forms/YellowRect.qml b/tests/auto/qml/resources/apps/app1/qml/forms/YellowRect.qml
new file mode 100644
index 00000000..b1c91a1f
--- /dev/null
+++ b/tests/auto/qml/resources/apps/app1/qml/forms/YellowRect.qml
@@ -0,0 +1,35 @@
+/****************************************************************************
+**
+** Copyright (C) 2021 The Qt Company Ltd.
+** Copyright (C) 2019 Luxoft Sweden AB
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the QtApplicationManager module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:GPL$
+** 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 or (at your option) any later version
+** approved by the KDE Free Qt Foundation. The licenses are as published by
+** the Free Software Foundation and appearing in the file LICENSE.GPL3
+** 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$
+**
+****************************************************************************/
+
+import QtQuick 2.11
+
+Rectangle {
+ color: "yellow"
+}
diff --git a/tests/auto/qml/resources/apps/app1/qml/forms/qmldir b/tests/auto/qml/resources/apps/app1/qml/forms/qmldir
new file mode 100644
index 00000000..12a5506b
--- /dev/null
+++ b/tests/auto/qml/resources/apps/app1/qml/forms/qmldir
@@ -0,0 +1,4 @@
+module forms
+YellowRect 1.0 qrc:///app1/qml/forms/YellowRect.qml
+# :/app1/qml/forms/YellowRect.qml would not work
+AquaRect 1.0 AquaRect.qml
diff --git a/tests/auto/qml/resources/apps/app2/BlueRect.qml b/tests/auto/qml/resources/apps/app2/BlueRect.qml
new file mode 100644
index 00000000..138bdff4
--- /dev/null
+++ b/tests/auto/qml/resources/apps/app2/BlueRect.qml
@@ -0,0 +1,35 @@
+/****************************************************************************
+**
+** Copyright (C) 2021 The Qt Company Ltd.
+** Copyright (C) 2019 Luxoft Sweden AB
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the QtApplicationManager module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:GPL$
+** 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 or (at your option) any later version
+** approved by the KDE Free Qt Foundation. The licenses are as published by
+** the Free Software Foundation and appearing in the file LICENSE.GPL3
+** 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$
+**
+****************************************************************************/
+
+import QtQuick 2.11
+
+Rectangle {
+ color: "blue"
+}
diff --git a/tests/auto/qml/resources/apps/app2/CMakeLists.txt b/tests/auto/qml/resources/apps/app2/CMakeLists.txt
new file mode 100644
index 00000000..03a5a5a1
--- /dev/null
+++ b/tests/auto/qml/resources/apps/app2/CMakeLists.txt
@@ -0,0 +1,2 @@
+# Generated from app2.pro.
+
diff --git a/tests/auto/qml/resources/apps/app2/app2.pro b/tests/auto/qml/resources/apps/app2/app2.pro
new file mode 100644
index 00000000..7a5190df
--- /dev/null
+++ b/tests/auto/qml/resources/apps/app2/app2.pro
@@ -0,0 +1,8 @@
+TEMPLATE = aux
+
+RESOURCE_SOURCE = app2.qrc
+load(generate-resource)
+
+OTHER_FILES += \
+ info.yaml \
+ icon.png
diff --git a/tests/auto/qml/resources/apps/app2/app2.qml b/tests/auto/qml/resources/apps/app2/app2.qml
new file mode 100644
index 00000000..c0310ee0
--- /dev/null
+++ b/tests/auto/qml/resources/apps/app2/app2.qml
@@ -0,0 +1,46 @@
+/****************************************************************************
+**
+** Copyright (C) 2021 The Qt Company Ltd.
+** Copyright (C) 2019 Luxoft Sweden AB
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the QtApplicationManager module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:GPL$
+** 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 or (at your option) any later version
+** approved by the KDE Free Qt Foundation. The licenses are as published by
+** the Free Software Foundation and appearing in the file LICENSE.GPL3
+** 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$
+**
+****************************************************************************/
+
+import QtApplicationManager.Application 2.0
+import QtQuick 2.11
+import appwidgets 1.0
+import common 1.0
+
+ApplicationManagerWindow {
+ CommonObj { id: common }
+ BlueRect { }
+ GreenRect { }
+
+ Timer {
+ running: true
+ interval: 20
+ onTriggered: setWindowProperty("meaning", common.meaning);
+ }
+}
diff --git a/tests/auto/qml/resources/apps/app2/app2.qrc b/tests/auto/qml/resources/apps/app2/app2.qrc
new file mode 100644
index 00000000..80bc560c
--- /dev/null
+++ b/tests/auto/qml/resources/apps/app2/app2.qrc
@@ -0,0 +1,6 @@
+<!DOCTYPE RCC><RCC version="1.0">
+<qresource>
+ <file>app2.qml</file>
+ <file>BlueRect.qml</file>
+</qresource>
+</RCC>
diff --git a/tests/auto/qml/resources/apps/app2/icon.png b/tests/auto/qml/resources/apps/app2/icon.png
new file mode 100644
index 00000000..c1397153
--- /dev/null
+++ b/tests/auto/qml/resources/apps/app2/icon.png
Binary files differ
diff --git a/tests/auto/qml/resources/apps/app2/info.yaml b/tests/auto/qml/resources/apps/app2/info.yaml
new file mode 100644
index 00000000..6eda565b
--- /dev/null
+++ b/tests/auto/qml/resources/apps/app2/info.yaml
@@ -0,0 +1,15 @@
+formatVersion: 1
+formatType: am-package
+---
+id: 'app2'
+icon: 'icon.png'
+name:
+ en: 'Resource Test App 2'
+
+applications:
+ - id: 'app2'
+ code: ':/app2.qml'
+ runtime: 'qml'
+ runtimeParameters:
+ importPaths: "qml"
+ resources: "app2.rcc"
diff --git a/tests/auto/qml/resources/apps/app2/qml/appwidgets/GreenRect.qml b/tests/auto/qml/resources/apps/app2/qml/appwidgets/GreenRect.qml
new file mode 100644
index 00000000..7bf8d3a3
--- /dev/null
+++ b/tests/auto/qml/resources/apps/app2/qml/appwidgets/GreenRect.qml
@@ -0,0 +1,35 @@
+/****************************************************************************
+**
+** Copyright (C) 2021 The Qt Company Ltd.
+** Copyright (C) 2019 Luxoft Sweden AB
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the QtApplicationManager module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:GPL$
+** 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 or (at your option) any later version
+** approved by the KDE Free Qt Foundation. The licenses are as published by
+** the Free Software Foundation and appearing in the file LICENSE.GPL3
+** 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$
+**
+****************************************************************************/
+
+import QtQuick 2.11
+
+Rectangle {
+ color: "green"
+}
diff --git a/tests/auto/qml/resources/apps/app2/qml/appwidgets/qmldir b/tests/auto/qml/resources/apps/app2/qml/appwidgets/qmldir
new file mode 100644
index 00000000..a158bf25
--- /dev/null
+++ b/tests/auto/qml/resources/apps/app2/qml/appwidgets/qmldir
@@ -0,0 +1,2 @@
+module appwidgets
+GreenRect 1.0 GreenRect.qml
diff --git a/tests/auto/qml/resources/qml/widgets/MagentaRect.qml b/tests/auto/qml/resources/qml/widgets/MagentaRect.qml
new file mode 100644
index 00000000..511cea95
--- /dev/null
+++ b/tests/auto/qml/resources/qml/widgets/MagentaRect.qml
@@ -0,0 +1,35 @@
+/****************************************************************************
+**
+** Copyright (C) 2021 The Qt Company Ltd.
+** Copyright (C) 2019 Luxoft Sweden AB
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the QtApplicationManager module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:GPL$
+** 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 or (at your option) any later version
+** approved by the KDE Free Qt Foundation. The licenses are as published by
+** the Free Software Foundation and appearing in the file LICENSE.GPL3
+** 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$
+**
+****************************************************************************/
+
+import QtQuick 2.11
+
+Rectangle {
+ color: "magenta"
+}
diff --git a/tests/auto/qml/resources/qml/widgets/RedRect.qml b/tests/auto/qml/resources/qml/widgets/RedRect.qml
new file mode 100644
index 00000000..a27122e7
--- /dev/null
+++ b/tests/auto/qml/resources/qml/widgets/RedRect.qml
@@ -0,0 +1,35 @@
+/****************************************************************************
+**
+** Copyright (C) 2021 The Qt Company Ltd.
+** Copyright (C) 2019 Luxoft Sweden AB
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the QtApplicationManager module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:GPL$
+** 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 or (at your option) any later version
+** approved by the KDE Free Qt Foundation. The licenses are as published by
+** the Free Software Foundation and appearing in the file LICENSE.GPL3
+** 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$
+**
+****************************************************************************/
+
+import QtQuick 2.11
+
+Rectangle {
+ color: "red"
+}
diff --git a/tests/auto/qml/resources/qml/widgets/qmldir b/tests/auto/qml/resources/qml/widgets/qmldir
new file mode 100644
index 00000000..be36132a
--- /dev/null
+++ b/tests/auto/qml/resources/qml/widgets/qmldir
@@ -0,0 +1,3 @@
+module widgets
+RedRect 1.0 RedRect.qml
+MagentaRect 1.0 MagentaRect.qml
diff --git a/tests/auto/qml/resources/relative/elements/LinenRect.qml b/tests/auto/qml/resources/relative/elements/LinenRect.qml
new file mode 100644
index 00000000..1fdf9205
--- /dev/null
+++ b/tests/auto/qml/resources/relative/elements/LinenRect.qml
@@ -0,0 +1,35 @@
+/****************************************************************************
+**
+** Copyright (C) 2021 The Qt Company Ltd.
+** Copyright (C) 2020 Luxoft Sweden AB
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the QtApplicationManager module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:GPL$
+** 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 or (at your option) any later version
+** approved by the KDE Free Qt Foundation. The licenses are as published by
+** the Free Software Foundation and appearing in the file LICENSE.GPL3
+** 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$
+**
+****************************************************************************/
+
+import QtQuick 2.11
+
+Rectangle {
+ color: "linen"
+}
diff --git a/tests/auto/qml/resources/relative/elements/qmldir b/tests/auto/qml/resources/relative/elements/qmldir
new file mode 100644
index 00000000..16a01e45
--- /dev/null
+++ b/tests/auto/qml/resources/relative/elements/qmldir
@@ -0,0 +1,2 @@
+module elements
+LinenRect 1.0 LinenRect.qml
diff --git a/tests/auto/qml/resources/resources.pro b/tests/auto/qml/resources/resources.pro
new file mode 100644
index 00000000..6da64f00
--- /dev/null
+++ b/tests/auto/qml/resources/resources.pro
@@ -0,0 +1,5 @@
+TEMPLATE = subdirs
+SUBDIRS = test.pro \
+ appcommon \
+ apps/app1 \
+ apps/app2
diff --git a/tests/auto/qml/resources/systemuifile.qrc b/tests/auto/qml/resources/systemuifile.qrc
new file mode 100644
index 00000000..ce48e1a4
--- /dev/null
+++ b/tests/auto/qml/resources/systemuifile.qrc
@@ -0,0 +1,6 @@
+<!DOCTYPE RCC><RCC version="1.0">
+<qresource>
+ <file>qml/widgets/RedRect.qml</file>
+ <file>qml/widgets/qmldir</file>
+</qresource>
+</RCC>
diff --git a/tests/auto/qml/resources/systemuiplugin.qrc b/tests/auto/qml/resources/systemuiplugin.qrc
new file mode 100644
index 00000000..7fe63a54
--- /dev/null
+++ b/tests/auto/qml/resources/systemuiplugin.qrc
@@ -0,0 +1,5 @@
+<!DOCTYPE RCC><RCC version="1.0">
+<qresource>
+ <file>qml/widgets/MagentaRect.qml</file>
+</qresource>
+</RCC>
diff --git a/tests/auto/qml/resources/test.pro b/tests/auto/qml/resources/test.pro
new file mode 100644
index 00000000..3553c02a
--- /dev/null
+++ b/tests/auto/qml/resources/test.pro
@@ -0,0 +1,18 @@
+AM_CONFIG = am-config.yaml
+TEST_FILES = tst_resource.qml
+TEST_APPS = app1 app2
+
+DIRECTORIES = apps/app2/qml relative
+FILES = am-config.yaml \
+ apps/app1/icon.png apps/app1/info.yaml \
+ apps/app2/icon.png apps/app2/info.yaml
+DESTDIR = $$OUT_PWD
+load(am-qml-testcase)
+
+RESOURCE_SOURCE = systemuifile.qrc
+load(generate-resource)
+
+TEMPLATE = lib
+TARGET = systemuiplugin
+CONFIG += plugin
+RESOURCES = systemuiplugin.qrc
diff --git a/tests/auto/qml/resources/tst_resource.qml b/tests/auto/qml/resources/tst_resource.qml
new file mode 100644
index 00000000..8eb0e406
--- /dev/null
+++ b/tests/auto/qml/resources/tst_resource.qml
@@ -0,0 +1,81 @@
+/****************************************************************************
+**
+** Copyright (C) 2021 The Qt Company Ltd.
+** Copyright (C) 2019 Luxoft Sweden AB
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the QtApplicationManager module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:GPL$
+** 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 or (at your option) any later version
+** approved by the KDE Free Qt Foundation. The licenses are as published by
+** the Free Software Foundation and appearing in the file LICENSE.GPL3
+** 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$
+**
+****************************************************************************/
+
+import QtQuick 2.11
+import QtTest 1.0
+import QtApplicationManager.SystemUI 2.0
+import widgets 1.0
+
+TestCase {
+ id: testCase
+ when: windowShown
+ name: "ResourceTest"
+
+ RedRect {}
+ MagentaRect {}
+
+ SignalSpy {
+        id: runStateChangedSpy
+        target: ApplicationManager
+        signalName: "applicationRunStateChanged"
+    }
+
+ SignalSpy {
+ id: windowPropertyChangedSpy
+ target: WindowManager
+ signalName: "windowPropertyChanged"
+ }
+
+ function test_basic_data() {
+ return [ { tag: "app1" },
+ { tag: "app2" } ];
+ }
+
+ function test_basic(data) {
+ wait(1200); // wait for quicklaunch
+
+ var app = ApplicationManager.application(data.tag);
+ windowPropertyChangedSpy.clear();
+
+ app.start();
+ while (app.runState !== ApplicationObject.Running)
+ runStateChangedSpy.wait(3000);
+
+ if (data.tag === "app2") {
+ windowPropertyChangedSpy.wait(2000);
+ compare(windowPropertyChangedSpy.count, 1);
+ compare(windowPropertyChangedSpy.signalArguments[0][0].windowProperty("meaning"), 42);
+ }
+
+ app.stop();
+ while (app.runState !== ApplicationObject.NotRunning)
+ runStateChangedSpy.wait(3000);
+ }
+}