diff options
author | Bernd Weimer <bernd.weimer@qt.io> | 2022-01-18 16:02:51 +0100 |
---|---|---|
committer | Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> | 2022-01-19 11:43:52 +0000 |
commit | 718432bd7b4d900c0e393900869c1c782d6e8126 (patch) | |
tree | 1ff4a37b411eb5db400e3019afd6faec6636b81d /examples/applicationmanager/application-features | |
parent | a7b9a67c56cc3fa22a23eb734b248d1987eeeec2 (diff) |
Improve examples
Fixed build issues, avoided warnings and improved output.
Change-Id: I07f2e950399fb7b5a934686e5efe48cfaf7135e4
Reviewed-by: Robert Griebl <robert.griebl@qt.io>
(cherry picked from commit 98e900a40c9bb237b0c0ff5e50cc06f45923b42a)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'examples/applicationmanager/application-features')
5 files changed, 9 insertions, 7 deletions
diff --git a/examples/applicationmanager/application-features/apps/compositor/compositor.qml b/examples/applicationmanager/application-features/apps/compositor/compositor.qml index 64028fd3..8cdd8ffe 100644 --- a/examples/applicationmanager/application-features/apps/compositor/compositor.qml +++ b/examples/applicationmanager/application-features/apps/compositor/compositor.qml @@ -69,7 +69,7 @@ ApplicationManagerWindow { textFormat: Text.RichText text: "This Wayland<sup>*</sup> client window implements a Wayland compositor (nested compositor). " + "To display Wayland clients here, set:<br><br><b>WAYLAND_DISPLAY=qtam-wayland-nested</b>" + - "<br><br>For instance:<br>WAYLAND_DISPLAY=qtam-wayland-nested qmlscene client.qml -platform wayland" + + "<br><br>For instance:<br>WAYLAND_DISPLAY=qtam-wayland-nested qml client.qml -platform wayland" + "<br><br><small>* in multi-process mode</small>" } @@ -82,11 +82,11 @@ ApplicationManagerWindow { } WlShell { - onWlShellSurfaceCreated: shellSurfaces.append({shellSurface: shellSurface}); + onWlShellSurfaceCreated: (shellSurface) => shellSurfaces.append({shellSurface: shellSurface}); } XdgShell { - onToplevelCreated: shellSurfaces.append({shellSurface: xdgSurface}); + onToplevelCreated: (toplevel, xdgSurface) => shellSurfaces.append({shellSurface: xdgSurface}); } } @@ -100,5 +100,5 @@ ApplicationManagerWindow { Component.onCompleted: console.info("Start a client application in the nested compositor for instance with:\n " + "WAYLAND_DISPLAY=qtam-wayland-nested QT_WAYLAND_DISABLE_WINDOWDECORATION=1 " + - "QT_WAYLAND_SHELL_INTEGRATION=xdg-shell qmlscene client.qml -platform wayland"); + "QT_WAYLAND_SHELL_INTEGRATION=xdg-shell qml client.qml -platform wayland"); } diff --git a/examples/applicationmanager/application-features/doc/src/application-features.qdoc b/examples/applicationmanager/application-features/doc/src/application-features.qdoc index 3d81874d..4cf083cc 100644 --- a/examples/applicationmanager/application-features/doc/src/application-features.qdoc +++ b/examples/applicationmanager/application-features/doc/src/application-features.qdoc @@ -64,7 +64,7 @@ variable appropriately. To start a client with this environment variable set via command line: \badcode -WAYLAND_DISPLAY=qtam-wayland-nested qmlscene client.qml -platform wayland +WAYLAND_DISPLAY=qtam-wayland-nested qml client.qml -platform wayland \endcode This command only works in multi-process mode, since the nested compositor needs a real window as diff --git a/examples/applicationmanager/application-features/native/CMakeLists.txt b/examples/applicationmanager/application-features/native/CMakeLists.txt index de87a32a..97ebbcd1 100644 --- a/examples/applicationmanager/application-features/native/CMakeLists.txt +++ b/examples/applicationmanager/application-features/native/CMakeLists.txt @@ -1,3 +1,4 @@ +find_package(Qt6 COMPONENTS WaylandClient) if(TARGET Qt::WaylandClient AND TARGET Qt::Widgets) add_subdirectory(widgets) diff --git a/examples/applicationmanager/application-features/native/widgets/CMakeLists.txt b/examples/applicationmanager/application-features/native/widgets/CMakeLists.txt index 39d11923..b4c977da 100644 --- a/examples/applicationmanager/application-features/native/widgets/CMakeLists.txt +++ b/examples/applicationmanager/application-features/native/widgets/CMakeLists.txt @@ -17,6 +17,7 @@ set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/applicationmanager/application-fe find_package(Qt6 COMPONENTS Core) find_package(Qt6 COMPONENTS Gui) find_package(Qt6 COMPONENTS Widgets) +find_package(Qt6 COMPONENTS AppManLauncherPrivate) qt_add_executable(widgets main.cpp @@ -24,12 +25,12 @@ qt_add_executable(widgets set_target_properties(widgets PROPERTIES WIN32_EXECUTABLE TRUE MACOSX_BUNDLE TRUE + RUNTIME_OUTPUT_DIRECTORY ../../apps/widgets ) target_link_libraries(widgets PUBLIC Qt::Core Qt::Gui Qt::Widgets - Qt::AppManCommonPrivate Qt::AppManLauncherPrivate ) diff --git a/examples/applicationmanager/application-features/native/widgets/widgets.pro b/examples/applicationmanager/application-features/native/widgets/widgets.pro index bf5ef1d4..9a93277d 100644 --- a/examples/applicationmanager/application-features/native/widgets/widgets.pro +++ b/examples/applicationmanager/application-features/native/widgets/widgets.pro @@ -1,6 +1,6 @@ TEMPLATE = app CONFIG += install_ok -QT += widgets appman_launcher-private appman_common-private +QT += widgets appman_launcher-private SOURCES = main.cpp |