diff options
author | Bernd Weimer <bernd.weimer@qt.io> | 2022-07-01 10:42:31 +0200 |
---|---|---|
committer | Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> | 2022-07-01 09:33:05 +0000 |
commit | b5a69d695e43aba99631eb812db5caad73f1a4cd (patch) | |
tree | 0e0ab06a32bb266c9bd7572b4351d12edc114bed | |
parent | a26f5d83c4a079207f0d3cbe4b78507fc2ddf437 (diff) | |
download | qtapplicationmanager-b5a69d695e43aba99631eb812db5caad73f1a4cd.tar.gz |
Make tests pass for "no-dbus" builds
Achieved by unconditionally supporting dbus option, like any other
option. Also removed start-session-dbus option completely and added
parameters to JS functions in intents test.
Change-Id: I8057bc23fd0072c997c8a42539ef23a6c7a9e28a
Reviewed-by: Robert Griebl <robert.griebl@qt.io>
(cherry picked from commit 093ee2d43eab7e4dfbdd9b41a4f3a3e039049067)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
-rw-r--r-- | src/main-lib/configuration.cpp | 6 | ||||
-rw-r--r-- | tests/auto/qml/intents/apps/intents1/intents1.qml | 4 | ||||
-rw-r--r-- | tests/auto/qml/intents/apps/intents2/intents2.qml | 2 |
3 files changed, 3 insertions, 9 deletions
diff --git a/src/main-lib/configuration.cpp b/src/main-lib/configuration.cpp index 4ea2553c..385abc07 100644 --- a/src/main-lib/configuration.cpp +++ b/src/main-lib/configuration.cpp @@ -156,10 +156,7 @@ Configuration::Configuration(const QStringList &defaultConfigFilePaths, m_clp.addOption({ qSL("app-image-mount-dir"), qSL("Deprecated (ignored)."), qSL("dir") }); m_clp.addOption({ qSL("disable-installer"), qSL("Disable the application installer sub-system.") }); m_clp.addOption({ qSL("disable-intents"), qSL("Disable the intents sub-system.") }); -#if defined(QT_DBUS_LIB) m_clp.addOption({ qSL("dbus"), qSL("Register on the specified D-Bus."), qSL("<bus>|system|session|none|auto"), qSL("auto") }); - m_clp.addOption({ qSL("start-session-dbus"), qSL("Deprecated (ignored).") }); -#endif m_clp.addOption({ qSL("fullscreen"), qSL("Display in full-screen.") }); m_clp.addOption({ qSL("no-fullscreen"), qSL("Do not display in full-screen.") }); m_clp.addOption({ qSL("I"), qSL("Additional QML import path."), qSL("dir") }); @@ -376,9 +373,6 @@ void Configuration::parseWithArguments(const QStringList &arguments) "configuration key specified. It won't be possible to install, remove or " "access installable packages."; } - - if (value<bool>("start-session-dbus")) - qCDebug(LogDeployment) << "ignoring '--start-session-dbus'"; } diff --git a/tests/auto/qml/intents/apps/intents1/intents1.qml b/tests/auto/qml/intents/apps/intents1/intents1.qml index a9aa404c..7816ed38 100644 --- a/tests/auto/qml/intents/apps/intents1/intents1.qml +++ b/tests/auto/qml/intents/apps/intents1/intents1.qml @@ -19,14 +19,14 @@ QtObject { property var handler: IntentHandler { intentIds: [ "only1", "both", "match" ] - onRequestReceived: { + onRequestReceived: (request) => { request.sendReply({ "from": ApplicationInterface.applicationId, "in": request.parameters}) } } property var customErrorHandler: IntentHandler { intentIds: [ "custom-error" ] - onRequestReceived: { + onRequestReceived: (request) => { request.sendErrorReply("custom error") } } diff --git a/tests/auto/qml/intents/apps/intents2/intents2.qml b/tests/auto/qml/intents/apps/intents2/intents2.qml index 2df1adca..435c9cb1 100644 --- a/tests/auto/qml/intents/apps/intents2/intents2.qml +++ b/tests/auto/qml/intents/apps/intents2/intents2.qml @@ -19,7 +19,7 @@ QtObject { property var handler: IntentHandler { intentIds: [ "both", "only2" ] - onRequestReceived: { + onRequestReceived: (request) => { Qt.callLater(function() { request.sendReply({ "from": ApplicationInterface.applicationId, "in": request.parameters}) }) |