summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorRobert Griebl <robert.griebl@qt.io>2023-09-26 11:25:34 +0200
committerRobert Griebl <robert.griebl@qt.io>2023-09-26 17:19:13 +0200
commit2cfa6be185b3aa32a96a15d012739135faaadb2a (patch)
tree6c2207267fc4c5d200aa9a79b726f27406d8148b /tests
parent6042485fe360d8611d3d6f123540a55af170d3bb (diff)
DBus cleanup, part 2 and shared QML API
Rewrote the NativeRuntime <-> Launcher communication using auto- generated interfaces and adaptors. Also made the shared QML classes (Notification and ApplicationInterface) simple QObjects, so the QMetaObject is always the same: both on the AM and the launcher side. This is necessary for qmlsc, as the compiler doesn't know how to deal with different MOC data for the same class name in different processes. Along the same lines, ApplicationManagerWindow is now a QObject, both for in-process (this was already the case) and out-of process use. The out-of-process/Wayland implementation will now implicitly allocate a QQuickWindow and re-parent it accordingly to have the same visibility behavior as if you would be using normal Windows. Also FrameTimer got an Impl backend, although in this case a special implementation is only needed for the System-UI. And additional unrelated change was rolled into this: launcher-lib was renamed to application-main-lib and the class LauncherMain to ApplicationMain to better reflect their purpose (the lib started as the basis for launcher-qml, but evolved into a generic app/launcher helper) The reason for including these changes here is that we are touching all the files in there anyway and having a rename after these big changes would make git blame far less useful. Change-Id: Iff915c1b2209f8104051dc131b9add5498df277c Task-number: QTBUG-103266 Reviewed-by: Dominik Holland <dominik.holland@qt.io>
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/applicationinstaller/tst_applicationinstaller.cpp4
-rw-r--r--tests/auto/packager-tool/tst_packager-tool.cpp4
-rw-r--r--tests/auto/qml/crash/tst_crash.qml2
-rw-r--r--tests/auto/qml/windowmapping/apps/test.winmap.amwin2/amwin2.qml3
4 files changed, 8 insertions, 5 deletions
diff --git a/tests/auto/applicationinstaller/tst_applicationinstaller.cpp b/tests/auto/applicationinstaller/tst_applicationinstaller.cpp
index 43719439..499f2db1 100644
--- a/tests/auto/applicationinstaller/tst_applicationinstaller.cpp
+++ b/tests/auto/applicationinstaller/tst_applicationinstaller.cpp
@@ -17,7 +17,7 @@
#include "error.h"
#include "private/packageutilities_p.h"
#include "runtimefactory.h"
-#include "qmlinprocessruntime.h"
+#include "qmlinprocruntime.h"
#include "packageutilities.h"
#include "../error-checking.h"
@@ -286,7 +286,7 @@ void tst_PackageManager::initTestCase()
// make sure we have a valid runtime available. The important part is
// that we have a runtime called "native" - the functionality does not matter.
- RuntimeFactory::instance()->registerRuntime(new QmlInProcessRuntimeManager(qSL("native")));
+ RuntimeFactory::instance()->registerRuntime(new QmlInProcRuntimeManager(qSL("native")));
}
void tst_PackageManager::cleanupTestCase()
diff --git a/tests/auto/packager-tool/tst_packager-tool.cpp b/tests/auto/packager-tool/tst_packager-tool.cpp
index aa156f20..3a8b6946 100644
--- a/tests/auto/packager-tool/tst_packager-tool.cpp
+++ b/tests/auto/packager-tool/tst_packager-tool.cpp
@@ -14,7 +14,7 @@
#include "packagedatabase.h"
#include "packagemanager.h"
#include "packagingjob.h"
-#include "qmlinprocessruntime.h"
+#include "qmlinprocruntime.h"
#include "runtimefactory.h"
#include "utilities.h"
@@ -107,7 +107,7 @@ void tst_PackagerTool::initTestCase()
m_storePassword = qSL("password");
m_storeCertificate = qL1S(AM_TESTDATA_DIR "certificates/store.p12");
- RuntimeFactory::instance()->registerRuntime(new QmlInProcessRuntimeManager(qSL("qml")));
+ RuntimeFactory::instance()->registerRuntime(new QmlInProcRuntimeManager(qSL("qml")));
}
void tst_PackagerTool::cleanup()
diff --git a/tests/auto/qml/crash/tst_crash.qml b/tests/auto/qml/crash/tst_crash.qml
index e6096b6d..7edfc128 100644
--- a/tests/auto/qml/crash/tst_crash.qml
+++ b/tests/auto/qml/crash/tst_crash.qml
@@ -43,7 +43,7 @@ TestCase {
runStateChangedSpy.wait(spyTimeout);
compare(app.runState, ApplicationObject.Running);
ApplicationManager.startApplication(appId, data.tag);
- runStateChangedSpy.wait(spyTimeout);
+ runStateChangedSpy.wait(spyTimeout * 5); // libbacktrace can be slow
compare(app.runState, ApplicationObject.NotRunning);
if (data.tag === "gracefully") {
compare(app.lastExitStatus, ApplicationObject.NormalExit);
diff --git a/tests/auto/qml/windowmapping/apps/test.winmap.amwin2/amwin2.qml b/tests/auto/qml/windowmapping/apps/test.winmap.amwin2/amwin2.qml
index f80a3ce9..5121a294 100644
--- a/tests/auto/qml/windowmapping/apps/test.winmap.amwin2/amwin2.qml
+++ b/tests/auto/qml/windowmapping/apps/test.winmap.amwin2/amwin2.qml
@@ -9,10 +9,12 @@ import QtApplicationManager.Application 2.0
ApplicationManagerWindow {
id: root
visible: false
+ objectName: "root"
ApplicationManagerWindow {
id: sub
visible: false
+ objectName: "sub"
Component.onCompleted: setWindowProperty("type", "sub");
}
@@ -23,6 +25,7 @@ ApplicationManagerWindow {
ApplicationManagerWindow {
id: sub2
visible: false
+ objectName: "sub2"
Component.onCompleted: setWindowProperty("type", "sub2");
}
}