diff options
author | Robert Griebl <robert.griebl@qt.io> | 2021-07-21 16:50:20 +0200 |
---|---|---|
committer | Robert Griebl <robert.griebl@qt.io> | 2021-07-27 20:11:19 +0200 |
commit | 006a1f1c934379ff46061230bad2a0eba337129e (patch) | |
tree | aa2a7a24b0db553881bd9571d7338bfb24415615 /examples/applicationmanager/minidesk | |
parent | ca39c6d952c6812d5fa75913432d6fc9dd4e8a81 (diff) |
Remove the old deprecated ApplicationIPCManager IPC mechanism
The unit tests that needed an IPC side channel have been updated to use
intents instead.
Change-Id: Ifbd82728557eadaea08425e9eacf2cbf8a08293e
Reviewed-by: Dominik Holland <dominik.holland@qt.io>
Diffstat (limited to 'examples/applicationmanager/minidesk')
3 files changed, 2 insertions, 64 deletions
diff --git a/examples/applicationmanager/minidesk/apps/tld.minidesk.app2/app2.qml b/examples/applicationmanager/minidesk/apps/tld.minidesk.app2/app2.qml index 763aa89c..9c64fdb6 100644 --- a/examples/applicationmanager/minidesk/apps/tld.minidesk.app2/app2.qml +++ b/examples/applicationmanager/minidesk/apps/tld.minidesk.app2/app2.qml @@ -81,22 +81,4 @@ ApplicationManagerWindow { target.acknowledgeQuit(); } } - - ApplicationInterfaceExtension { - id: extension - name: "tld.minidesk.interface" - - onReadyChanged: console.log("App2: circumference function returned: " - + object.circumference(2.0, "plate") + ", it used pi = " + object.pi); - } - - Connections { - target: extension.object - function onComputed(what) { - console.log("App2: " + what + " has been computed"); - } - function onPiChanged() { - console.log("App2: pi changed: " + target.pi); - } - } } diff --git a/examples/applicationmanager/minidesk/doc/src/minidesk.qdoc b/examples/applicationmanager/minidesk/doc/src/minidesk.qdoc index 364743f9..c367b804 100644 --- a/examples/applicationmanager/minidesk/doc/src/minidesk.qdoc +++ b/examples/applicationmanager/minidesk/doc/src/minidesk.qdoc @@ -54,7 +54,6 @@ The following features are supported: \li Stop or restart App1 animations with a click \li App1 sends rotation angle as a window property to System UI on stop \li App1 shows a pop up on the System UI when it is paused - \li App2 makes use of an IPC extension when it starts \li App2 logs the document URL that started it \li App2 triggers a notification in the System UI, when the bulb icon is clicked \li Show Wayland client windows that originate from processes outside of \c appman @@ -62,8 +61,7 @@ The following features are supported: \note This example can be run in single-process or multi-process mode. In the walkthrough below, we use multi-process and its corresponding terminology. The terms \e client and \e application; -\e server and \e {System UI} are used interchangeably. The System UI comprises both compositing and -generic Inter-Process Communication (IPC). +\e server and \e {System UI} are used interchangeably. To start the example, navigate to the \c minidesk folder, and run the following command: \badcode @@ -198,7 +196,7 @@ notification. For brevity, the example only presents the first notification. \quotefromfile applicationmanager/minidesk/system-ui/main.qml \skipto Handler for WindowManager signals -\printto IPC extension +\printto /^\}/ This is the vital part of the System UI, where the window (surfaces) of the applications are mapped to \l{WindowItem}s in the System UI. When a new application window is available (becomes visible), @@ -219,32 +217,6 @@ instance in KDE's Calculator: $ QT_WAYLAND_DISABLE_WINDOWDECORATION=1 WAYLAND_DISPLAY=qtam-wayland-0 kcalc -platform wayland \endcode -\section2 Inter-Process Communication (IPC) Extension - -The following snippet demonstrates how the \l{ApplicationIPCInterface} can be used to define an IPC -extension. The IPC interface has to be defined in the System UI, for instance: - -\printuntil Component.onCompleted -\printline } - -Here, a \c pi property is defined, as well as a \c computed signal and a \c circumference function. -After registering this interface with -\l{ApplicationIPCManager::registerInterface()}{ApplicationIPCManager.registerInterface()}, it can -be used from the application processes. - -On the application side, the \l{ApplicationInterfaceExtension} type has to be used. Here's how -App2 makes use of this interface extension: - -\quotefromfile applicationmanager/minidesk/apps/tld.minidesk.app2/app2.qml -\skipto ApplicationInterfaceExtension -\printuntil onPiChanged -\printuntil /^\s{4}\}/ - -The interface is used here as soon as it's ready. Of course, the interface can be accessed from -elsewhere, too. The \l{ApplicationInterfaceExtension::name}{ApplicationInterfaceExtension.name} -must match the name it was registered with in -\l{ApplicationIPCManager::registerInterface()}{ApplicationIPCManager.registerInterface()}. - \section2 Application Termination When an application is stopped from the System UI through diff --git a/examples/applicationmanager/minidesk/system-ui/main.qml b/examples/applicationmanager/minidesk/system-ui/main.qml index e6c84506..7eb3f560 100644 --- a/examples/applicationmanager/minidesk/system-ui/main.qml +++ b/examples/applicationmanager/minidesk/system-ui/main.qml @@ -177,20 +177,4 @@ Window { console.log("SystemUI: OnWindowPropertyChanged [" + window + "] - " + name + ": " + value); } } - - // IPC extension - ApplicationIPCInterface { - property double pi - signal computed(string what) - readonly property var _decltype_circumference: { "double": [ "double", "string" ] } - function circumference(radius, thing) { - console.log("SystemUI: circumference(" + radius + ", \"" + thing + "\") has been called"); - pi = 3.14; - var circ = 2 * pi * radius; - computed("circumference for " + thing); - return circ; - } - - Component.onCompleted: ApplicationIPCManager.registerInterface(this, "tld.minidesk.interface", {}); - } } |