summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorRobert Griebl <robert.griebl@qt.io>2023-10-31 16:26:40 +0100
committerRobert Griebl <robert.griebl@qt.io>2023-11-08 16:19:40 +0100
commitee0028f65e78dc4ae43abe3d07902e9cd9662495 (patch)
tree2a07b781de679ec6e8de79e0b4e641bafd729728 /tests
parentfef2d9a8666e333b4e01518936de12b326d25478 (diff)
Switch to declarative registration
After reworking all the sys-ui/app shared classes, we can now finally switch to declarative registration. As each QML namespace can only have one qt_internal_add_qml_module assigned, we need a dedicated lib/module for each of our namespaces. Due to this problem and in order to keep the code clean, all declarative registrations are kept out of the actual classes (as these are spread over multiple static libs). Instead they are all done in one place (src/qml/../) using the "foreign" syntax. The internal AmTest class (only used for the QML auto tests) had to be moved to a new QtApplicationManager.Test namespace, because adding an imperative registration to a declaratively registered namespace hides all the existing classes. Change-Id: I2e5b782da33a470a6d267cf45b42866fe6a9c14e Task-number: QTBUG-103266 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Dominik Holland <dominik.holland@qt.io>
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/controller-tool/CMakeLists.txt1
-rw-r--r--tests/auto/controller-tool/tst_controller-tool.cpp4
-rw-r--r--tests/auto/qml/active/tst_active.qml1
-rw-r--r--tests/auto/qml/bubblewrap/tst_bubblewrap.qml1
-rw-r--r--tests/auto/qml/configs/tst_configs.qml1
-rw-r--r--tests/auto/qml/crash/tst_crash.qml1
-rw-r--r--tests/auto/qml/installer/tst_installer.qml1
-rw-r--r--tests/auto/qml/intents/tst_intents.qml1
-rw-r--r--tests/auto/qml/keyinput/tst_keyinput.qml1
-rw-r--r--tests/auto/qml/lifecycle/tst_lifecycle.qml1
-rw-r--r--tests/auto/qml/monitoring/tst_monitoring.qml1
-rw-r--r--tests/auto/qml/notifications/tst_notifications.qml1
-rw-r--r--tests/auto/qml/processtitle/tst_processtitle.qml1
-rw-r--r--tests/auto/qml/quicklaunch/tst_quicklaunch.qml1
-rw-r--r--tests/auto/qml/resources/tst_resource.qml1
-rw-r--r--tests/auto/qml/simple/tst_applicationmanager.qml1
-rw-r--r--tests/auto/qml/windowitem/tst_windowitem.qml1
-rw-r--r--tests/auto/qml/windowitem2/tst_windowitem2.qml1
-rw-r--r--tests/auto/qml/windowmanager/tst_windowmanager.qml1
-rw-r--r--tests/auto/qml/windowmapping/tst_windowmapping.qml1
20 files changed, 23 insertions, 0 deletions
diff --git a/tests/auto/controller-tool/CMakeLists.txt b/tests/auto/controller-tool/CMakeLists.txt
index 429553b4..aaf1b127 100644
--- a/tests/auto/controller-tool/CMakeLists.txt
+++ b/tests/auto/controller-tool/CMakeLists.txt
@@ -12,5 +12,6 @@ qt_internal_add_test(tst_controller-tool
Qt::AppManCommonPrivate
Qt::AppManIntentServerPrivate
Qt::AppManMainPrivate
+ Qt::AppManQmlSystemUIPrivate
Qt::AppManManagerPrivate
)
diff --git a/tests/auto/controller-tool/tst_controller-tool.cpp b/tests/auto/controller-tool/tst_controller-tool.cpp
index bd0f50eb..36fa1154 100644
--- a/tests/auto/controller-tool/tst_controller-tool.cpp
+++ b/tests/auto/controller-tool/tst_controller-tool.cpp
@@ -18,10 +18,14 @@
#include "main.h"
#include "exception.h"
#include "utilities.h"
+#include "qml-utilities.h"
#include "qtyaml.h"
#include <QtAppManMain/configuration.h>
+AM_QML_REGISTER_TYPES(QtApplicationManager_SystemUI)
+AM_QML_REGISTER_TYPES(QtApplicationManager)
+
QT_USE_NAMESPACE_AM
using namespace QtYaml;
diff --git a/tests/auto/qml/active/tst_active.qml b/tests/auto/qml/active/tst_active.qml
index 557c5144..0b2e4fa6 100644
--- a/tests/auto/qml/active/tst_active.qml
+++ b/tests/auto/qml/active/tst_active.qml
@@ -5,6 +5,7 @@ import QtQuick
import QtQuick.Controls.Basic
import QtTest
import QtApplicationManager.SystemUI
+import QtApplicationManager.Test
TestCase {
id: root
diff --git a/tests/auto/qml/bubblewrap/tst_bubblewrap.qml b/tests/auto/qml/bubblewrap/tst_bubblewrap.qml
index 3880c767..daea46b9 100644
--- a/tests/auto/qml/bubblewrap/tst_bubblewrap.qml
+++ b/tests/auto/qml/bubblewrap/tst_bubblewrap.qml
@@ -4,6 +4,7 @@
import QtQuick
import QtTest
import QtApplicationManager.SystemUI
+import QtApplicationManager.Test
TestCase {
id: testCase
diff --git a/tests/auto/qml/configs/tst_configs.qml b/tests/auto/qml/configs/tst_configs.qml
index 735d1596..9575abb7 100644
--- a/tests/auto/qml/configs/tst_configs.qml
+++ b/tests/auto/qml/configs/tst_configs.qml
@@ -7,6 +7,7 @@ import QtQuick 2.4
import QtTest 1.0
import QtApplicationManager 2.0
import QtApplicationManager.SystemUI 2.0
+import QtApplicationManager.Test
TestCase {
diff --git a/tests/auto/qml/crash/tst_crash.qml b/tests/auto/qml/crash/tst_crash.qml
index 7edfc128..00940ce6 100644
--- a/tests/auto/qml/crash/tst_crash.qml
+++ b/tests/auto/qml/crash/tst_crash.qml
@@ -6,6 +6,7 @@
import QtQuick 2.3
import QtTest 1.0
import QtApplicationManager.SystemUI 2.0
+import QtApplicationManager.Test
TestCase {
id: testCase
diff --git a/tests/auto/qml/installer/tst_installer.qml b/tests/auto/qml/installer/tst_installer.qml
index 4d7c63fc..e371fd63 100644
--- a/tests/auto/qml/installer/tst_installer.qml
+++ b/tests/auto/qml/installer/tst_installer.qml
@@ -6,6 +6,7 @@
import QtQuick 2.3
import QtTest 1.0
import QtApplicationManager.SystemUI 2.0
+import QtApplicationManager.Test
TestCase {
name: "Installer"
diff --git a/tests/auto/qml/intents/tst_intents.qml b/tests/auto/qml/intents/tst_intents.qml
index b4ae71dc..3f03ecbe 100644
--- a/tests/auto/qml/intents/tst_intents.qml
+++ b/tests/auto/qml/intents/tst_intents.qml
@@ -7,6 +7,7 @@ import QtQuick 2.4
import QtTest 1.0
import QtApplicationManager 2.1
import QtApplicationManager.SystemUI 2.1
+import QtApplicationManager.Test
TestCase {
id: testCase
diff --git a/tests/auto/qml/keyinput/tst_keyinput.qml b/tests/auto/qml/keyinput/tst_keyinput.qml
index c41dc601..dbcc2e25 100644
--- a/tests/auto/qml/keyinput/tst_keyinput.qml
+++ b/tests/auto/qml/keyinput/tst_keyinput.qml
@@ -4,6 +4,7 @@
import QtQuick
import QtTest
import QtApplicationManager.SystemUI
+import QtApplicationManager.Test
TestCase {
id: root
diff --git a/tests/auto/qml/lifecycle/tst_lifecycle.qml b/tests/auto/qml/lifecycle/tst_lifecycle.qml
index 5b8c6fe2..c8e34cec 100644
--- a/tests/auto/qml/lifecycle/tst_lifecycle.qml
+++ b/tests/auto/qml/lifecycle/tst_lifecycle.qml
@@ -5,6 +5,7 @@
import QtQuick 2.11
import QtTest 1.0
import QtApplicationManager.SystemUI 2.0
+import QtApplicationManager.Test
TestCase {
id: testCase
diff --git a/tests/auto/qml/monitoring/tst_monitoring.qml b/tests/auto/qml/monitoring/tst_monitoring.qml
index bbb15146..b2800a08 100644
--- a/tests/auto/qml/monitoring/tst_monitoring.qml
+++ b/tests/auto/qml/monitoring/tst_monitoring.qml
@@ -4,6 +4,7 @@
import QtQuick
import QtTest
import QtApplicationManager.SystemUI
+import QtApplicationManager.Test
TestCase {
id: testCase
diff --git a/tests/auto/qml/notifications/tst_notifications.qml b/tests/auto/qml/notifications/tst_notifications.qml
index a6e9ede4..cac0da18 100644
--- a/tests/auto/qml/notifications/tst_notifications.qml
+++ b/tests/auto/qml/notifications/tst_notifications.qml
@@ -4,6 +4,7 @@
import QtQuick
import QtTest
import QtApplicationManager.SystemUI
+import QtApplicationManager.Test
TestCase {
id: testCase
diff --git a/tests/auto/qml/processtitle/tst_processtitle.qml b/tests/auto/qml/processtitle/tst_processtitle.qml
index 5210328a..3db55885 100644
--- a/tests/auto/qml/processtitle/tst_processtitle.qml
+++ b/tests/auto/qml/processtitle/tst_processtitle.qml
@@ -5,6 +5,7 @@
import QtQuick 2.15
import QtTest 1.0
import QtApplicationManager.SystemUI 2.0
+import QtApplicationManager.Test
TestCase {
diff --git a/tests/auto/qml/quicklaunch/tst_quicklaunch.qml b/tests/auto/qml/quicklaunch/tst_quicklaunch.qml
index f308a8fe..733e2925 100644
--- a/tests/auto/qml/quicklaunch/tst_quicklaunch.qml
+++ b/tests/auto/qml/quicklaunch/tst_quicklaunch.qml
@@ -6,6 +6,7 @@
import QtQuick 2.3
import QtTest 1.0
import QtApplicationManager.SystemUI 2.0
+import QtApplicationManager.Test
// Tests are meaningless in single-process mode, but still work
diff --git a/tests/auto/qml/resources/tst_resource.qml b/tests/auto/qml/resources/tst_resource.qml
index 271c9268..f0ea271d 100644
--- a/tests/auto/qml/resources/tst_resource.qml
+++ b/tests/auto/qml/resources/tst_resource.qml
@@ -5,6 +5,7 @@
import QtQuick 2.11
import QtTest 1.0
import QtApplicationManager.SystemUI 2.0
+import QtApplicationManager.Test
import widgets 1.0
TestCase {
diff --git a/tests/auto/qml/simple/tst_applicationmanager.qml b/tests/auto/qml/simple/tst_applicationmanager.qml
index 46c7e62a..34756f18 100644
--- a/tests/auto/qml/simple/tst_applicationmanager.qml
+++ b/tests/auto/qml/simple/tst_applicationmanager.qml
@@ -7,6 +7,7 @@ import QtQuick 2.3
import QtQuick.Window 2.0
import QtTest 1.0
import QtApplicationManager.SystemUI 2.0
+import QtApplicationManager.Test
TestCase {
id: testCase
diff --git a/tests/auto/qml/windowitem/tst_windowitem.qml b/tests/auto/qml/windowitem/tst_windowitem.qml
index 9e73136a..0e91d94c 100644
--- a/tests/auto/qml/windowitem/tst_windowitem.qml
+++ b/tests/auto/qml/windowitem/tst_windowitem.qml
@@ -6,6 +6,7 @@
import QtQuick 2.3
import QtTest 1.0
import QtApplicationManager.SystemUI 2.0
+import QtApplicationManager.Test
Item {
id: root
diff --git a/tests/auto/qml/windowitem2/tst_windowitem2.qml b/tests/auto/qml/windowitem2/tst_windowitem2.qml
index 8e476fe2..a0a72a4d 100644
--- a/tests/auto/qml/windowitem2/tst_windowitem2.qml
+++ b/tests/auto/qml/windowitem2/tst_windowitem2.qml
@@ -6,6 +6,7 @@
import QtQuick 2.3
import QtTest 1.0
import QtApplicationManager.SystemUI 2.0
+import QtApplicationManager.Test
Item {
id: root
diff --git a/tests/auto/qml/windowmanager/tst_windowmanager.qml b/tests/auto/qml/windowmanager/tst_windowmanager.qml
index d9a9f44e..88288227 100644
--- a/tests/auto/qml/windowmanager/tst_windowmanager.qml
+++ b/tests/auto/qml/windowmanager/tst_windowmanager.qml
@@ -5,6 +5,7 @@
import QtQuick 2.11
import QtTest 1.0
import QtApplicationManager.SystemUI 2.0
+import QtApplicationManager.Test
TestCase {
id: testCase
diff --git a/tests/auto/qml/windowmapping/tst_windowmapping.qml b/tests/auto/qml/windowmapping/tst_windowmapping.qml
index 39ea3a5f..d179376a 100644
--- a/tests/auto/qml/windowmapping/tst_windowmapping.qml
+++ b/tests/auto/qml/windowmapping/tst_windowmapping.qml
@@ -6,6 +6,7 @@
import QtQuick 2.3
import QtTest 1.0
import QtApplicationManager.SystemUI 2.0
+import QtApplicationManager.Test
TestCase {
id: testCase