diff --git a/changelog/next.md b/changelog/next.md index c2cf52a..12428d7 100644 --- a/changelog/next.md +++ b/changelog/next.md @@ -5,3 +5,4 @@ - Fixed desktop entries being parsed incorrectly with trailing whitespace or CRLF line endings. - Fixed `WlSessionLock.locked` changes not being emitted on unlock. - Fixed a crash when unplugging a screen being captured by ScreencopyView or trying to capture the fallback screen. +- Fixed most broken qml types in qmlls/qmllint for Qt 6.12. diff --git a/cmake/util.cmake b/cmake/util.cmake index 14fa7c2..7f4108a 100644 --- a/cmake/util.cmake +++ b/cmake/util.cmake @@ -21,8 +21,27 @@ endfunction() # DEPENDENCIES introduces a cmake dependency which we don't need with static modules. # This greatly improves comp speed by not introducing those dependencies. function (qs_add_module_deps_light target) - foreach (dep IN LISTS ARGN) - string(APPEND qmldir_extra "depends ${dep}\n") + cmake_parse_arguments(PARSE_ARGV 1 arg "" "" "URIS") + + set(uris) + + # Add dep metatypes files to target so it picks up the dep type data + foreach (dep IN LISTS arg_UNPARSED_ARGUMENTS) + get_target_property(uri ${dep} QT_QML_MODULE_URI) + get_target_property(metatypes ${dep} INTERFACE_QT_META_TYPES_BUILD_FILE) + + if (NOT uri OR NOT metatypes) + message(FATAL_ERROR "${dep} must be a qml module defined before ${target}") + endif() + + list(APPEND uris ${uri}) + target_sources(${target} PRIVATE ${metatypes}) + endforeach() + + list(APPEND uris ${arg_URIS}) + + foreach (uri IN LISTS uris) + string(APPEND qmldir_extra "depends ${uri}\n") endforeach() qs_append_qmldir(${target} "${qmldir_extra}") diff --git a/src/bluetooth/CMakeLists.txt b/src/bluetooth/CMakeLists.txt index 806ff04..53b3757 100644 --- a/src/bluetooth/CMakeLists.txt +++ b/src/bluetooth/CMakeLists.txt @@ -29,6 +29,8 @@ qt_add_qml_module(quickshell-bluetooth DEPENDENCIES QtQml ) +qs_add_module_deps_light(quickshell-bluetooth quickshell-core) + install_qml_module(quickshell-bluetooth) # dbus headers diff --git a/src/dbus/dbusmenu/CMakeLists.txt b/src/dbus/dbusmenu/CMakeLists.txt index 61cee42..add6a33 100644 --- a/src/dbus/dbusmenu/CMakeLists.txt +++ b/src/dbus/dbusmenu/CMakeLists.txt @@ -20,7 +20,7 @@ qt_add_qml_module(quickshell-dbusmenu DEPENDENCIES QtQml ) -qs_add_module_deps_light(quickshell-dbusmenu Quickshell) +qs_add_module_deps_light(quickshell-dbusmenu quickshell-core) install_qml_module(quickshell-dbusmenu) diff --git a/src/io/CMakeLists.txt b/src/io/CMakeLists.txt index 991beaa..859f05e 100644 --- a/src/io/CMakeLists.txt +++ b/src/io/CMakeLists.txt @@ -21,7 +21,7 @@ qt_add_qml_module(quickshell-io FileView.qml ) -qs_add_module_deps_light(quickshell-io Quickshell) +qs_add_module_deps_light(quickshell-io quickshell-core) install_qml_module(quickshell-io) target_link_libraries(quickshell-io PRIVATE Qt::Quick quickshell-ipc) diff --git a/src/network/CMakeLists.txt b/src/network/CMakeLists.txt index d82c0ab..e728e3f 100644 --- a/src/network/CMakeLists.txt +++ b/src/network/CMakeLists.txt @@ -19,7 +19,7 @@ qt_add_qml_module(quickshell-network DEPENDENCIES QtQml ) -qs_add_module_deps_light(quickshell-network Quickshell) +qs_add_module_deps_light(quickshell-network quickshell-core) install_qml_module(quickshell-network) target_link_libraries(quickshell-network PRIVATE quickshell-network-nm Qt::Qml Qt::DBus) qs_add_link_dependencies(quickshell-network quickshell-dbus) diff --git a/src/services/mpris/CMakeLists.txt b/src/services/mpris/CMakeLists.txt index 4440c0a..06be13a 100644 --- a/src/services/mpris/CMakeLists.txt +++ b/src/services/mpris/CMakeLists.txt @@ -33,7 +33,7 @@ qt_add_qml_module(quickshell-service-mpris DEPENDENCIES QtQml ) -qs_add_module_deps_light(quickshell-service-mpris Quickshell) +qs_add_module_deps_light(quickshell-service-mpris quickshell-core) install_qml_module(quickshell-service-mpris) diff --git a/src/services/notifications/CMakeLists.txt b/src/services/notifications/CMakeLists.txt index 58b6648..57f8376 100644 --- a/src/services/notifications/CMakeLists.txt +++ b/src/services/notifications/CMakeLists.txt @@ -22,7 +22,7 @@ qt_add_qml_module(quickshell-service-notifications VERSION 0.1 ) -qs_add_module_deps_light(quickshell-service-notifications Quickshell) +qs_add_module_deps_light(quickshell-service-notifications quickshell-core) install_qml_module(quickshell-service-notifications) target_link_libraries(quickshell-service-notifications PRIVATE Qt::Quick Qt::DBus) diff --git a/src/services/pipewire/CMakeLists.txt b/src/services/pipewire/CMakeLists.txt index fe894c9..43c4f08 100644 --- a/src/services/pipewire/CMakeLists.txt +++ b/src/services/pipewire/CMakeLists.txt @@ -20,7 +20,7 @@ qt_add_qml_module(quickshell-service-pipewire DEPENDENCIES QtQml ) -qs_add_module_deps_light(quickshell-service-pipewire Quickshell) +qs_add_module_deps_light(quickshell-service-pipewire quickshell-core) install_qml_module(quickshell-service-pipewire) diff --git a/src/services/status_notifier/CMakeLists.txt b/src/services/status_notifier/CMakeLists.txt index 7e0bf2b..913152e 100644 --- a/src/services/status_notifier/CMakeLists.txt +++ b/src/services/status_notifier/CMakeLists.txt @@ -44,7 +44,7 @@ qt_add_qml_module(quickshell-service-statusnotifier DEPENDENCIES QtQml ) -qs_add_module_deps_light(quickshell-service-statusnotifier Quickshell Quickshell.DBusMenu) +qs_add_module_deps_light(quickshell-service-statusnotifier quickshell-core quickshell-dbusmenu) install_qml_module(quickshell-service-statusnotifier) diff --git a/src/services/upower/CMakeLists.txt b/src/services/upower/CMakeLists.txt index b18ec15..5c9c1f9 100644 --- a/src/services/upower/CMakeLists.txt +++ b/src/services/upower/CMakeLists.txt @@ -34,7 +34,7 @@ qt_add_qml_module(quickshell-service-upower DEPENDENCIES QtQml ) -qs_add_module_deps_light(quickshell-service-upower Quickshell) +qs_add_module_deps_light(quickshell-service-upower quickshell-core) install_qml_module(quickshell-service-upower) diff --git a/src/wayland/CMakeLists.txt b/src/wayland/CMakeLists.txt index 509fd91..1768186 100644 --- a/src/wayland/CMakeLists.txt +++ b/src/wayland/CMakeLists.txt @@ -148,7 +148,7 @@ qt_add_qml_module(quickshell-wayland IMPORTS ${WAYLAND_MODULES} ) -qs_add_module_deps_light(quickshell-wayland Quickshell) +qs_add_module_deps_light(quickshell-wayland quickshell-core) install_qml_module(quickshell-wayland) diff --git a/src/wayland/background_effect/CMakeLists.txt b/src/wayland/background_effect/CMakeLists.txt index f45f94d..1103397 100644 --- a/src/wayland/background_effect/CMakeLists.txt +++ b/src/wayland/background_effect/CMakeLists.txt @@ -10,6 +10,8 @@ qt_add_qml_module(quickshell-wayland-background-effect DEPENDENCIES QtQml ) +qs_add_module_deps_light(quickshell-wayland-background-effect quickshell-core) + install_qml_module(quickshell-wayland-background-effect) wl_proto(wlp-background-effect ext-background-effect-v1 "${WAYLAND_PROTOCOLS}/staging/ext-background-effect") diff --git a/src/wayland/hyprland/CMakeLists.txt b/src/wayland/hyprland/CMakeLists.txt index 66b32b6..7f04e6e 100644 --- a/src/wayland/hyprland/CMakeLists.txt +++ b/src/wayland/hyprland/CMakeLists.txt @@ -30,7 +30,7 @@ qt_add_qml_module(quickshell-hyprland IMPORTS ${HYPRLAND_MODULES} ) -qs_add_module_deps_light(quickshell-io Quickshell) +qs_add_module_deps_light(quickshell-hyprland quickshell-core) install_qml_module(quickshell-hyprland) # intentionally no pch as the module is empty diff --git a/src/wayland/hyprland/focus_grab/CMakeLists.txt b/src/wayland/hyprland/focus_grab/CMakeLists.txt index 9582562..4911a30 100644 --- a/src/wayland/hyprland/focus_grab/CMakeLists.txt +++ b/src/wayland/hyprland/focus_grab/CMakeLists.txt @@ -10,7 +10,7 @@ qt_add_qml_module(quickshell-hyprland-focus-grab DEPENDENCIES QtQml ) -qs_add_module_deps_light(quickshell-hyprland-focus-grab Quickshell) +qs_add_module_deps_light(quickshell-hyprland-focus-grab quickshell-core) install_qml_module(quickshell-hyprland-focus-grab) diff --git a/src/wayland/hyprland/ipc/CMakeLists.txt b/src/wayland/hyprland/ipc/CMakeLists.txt index 9e42520..e79841d 100644 --- a/src/wayland/hyprland/ipc/CMakeLists.txt +++ b/src/wayland/hyprland/ipc/CMakeLists.txt @@ -11,13 +11,15 @@ qt_add_qml_module(quickshell-hyprland-ipc DEPENDENCIES QtQuick ) -qs_add_module_deps_light(quickshell-hyprland-ipc Quickshell) +qs_add_module_deps_light(quickshell-hyprland-ipc quickshell-core) install_qml_module(quickshell-hyprland-ipc) target_link_libraries(quickshell-hyprland-ipc PRIVATE Qt::Quick quickshell-core) if (WAYLAND_TOPLEVEL_MANAGEMENT) + qs_add_module_deps_light(quickshell-hyprland-ipc quickshell-wayland-toplevel-management) + target_sources(quickshell-hyprland-ipc PRIVATE toplevel_mapping.cpp hyprland_toplevel.cpp diff --git a/src/wayland/hyprland/surface/CMakeLists.txt b/src/wayland/hyprland/surface/CMakeLists.txt index 7f889c9..0f762b6 100644 --- a/src/wayland/hyprland/surface/CMakeLists.txt +++ b/src/wayland/hyprland/surface/CMakeLists.txt @@ -10,6 +10,8 @@ qt_add_qml_module(quickshell-hyprland-surface-extensions DEPENDENCIES QtQml ) +qs_add_module_deps_light(quickshell-hyprland-surface-extensions quickshell-core) + install_qml_module(quickshell-hyprland-surface-extensions) wl_proto(wlp-hyprland-surface hyprland-surface-v1 "${CMAKE_CURRENT_SOURCE_DIR}") diff --git a/src/wayland/idle_inhibit/CMakeLists.txt b/src/wayland/idle_inhibit/CMakeLists.txt index eb346d6..668a617 100644 --- a/src/wayland/idle_inhibit/CMakeLists.txt +++ b/src/wayland/idle_inhibit/CMakeLists.txt @@ -11,7 +11,7 @@ qt_add_qml_module(quickshell-wayland-idle-inhibit install_qml_module(quickshell-wayland-idle-inhibit) -qs_add_module_deps_light(quickshell-wayland-idle-inhibit Quickshell) +qs_add_module_deps_light(quickshell-wayland-idle-inhibit quickshell-core) wl_proto(wlp-idle-inhibit idle-inhibit-unstable-v1 "${WAYLAND_PROTOCOLS}/unstable/idle-inhibit") diff --git a/src/wayland/idle_notify/CMakeLists.txt b/src/wayland/idle_notify/CMakeLists.txt index 889c7ce..74dc05d 100644 --- a/src/wayland/idle_notify/CMakeLists.txt +++ b/src/wayland/idle_notify/CMakeLists.txt @@ -11,7 +11,7 @@ qt_add_qml_module(quickshell-wayland-idle-notify install_qml_module(quickshell-wayland-idle-notify) -qs_add_module_deps_light(quickshell-wayland-idle-notify Quickshell) +qs_add_module_deps_light(quickshell-wayland-idle-notify quickshell-core) wl_proto(wlp-idle-notify ext-idle-notify-v1 "${WAYLAND_PROTOCOLS}/staging/ext-idle-notify") diff --git a/src/wayland/shortcuts_inhibit/CMakeLists.txt b/src/wayland/shortcuts_inhibit/CMakeLists.txt index 8dedd3d..46686fa 100644 --- a/src/wayland/shortcuts_inhibit/CMakeLists.txt +++ b/src/wayland/shortcuts_inhibit/CMakeLists.txt @@ -11,7 +11,7 @@ qt_add_qml_module(quickshell-wayland-shortcuts-inhibit install_qml_module(quickshell-wayland-shortcuts-inhibit) -qs_add_module_deps_light(quickshell-wayland-shortcuts-inhibit Quickshell) +qs_add_module_deps_light(quickshell-wayland-shortcuts-inhibit quickshell-core) wl_proto(wlp-shortcuts-inhibit keyboard-shortcuts-inhibit-unstable-v1 "${WAYLAND_PROTOCOLS}/unstable/keyboard-shortcuts-inhibit") diff --git a/src/wayland/toplevel/CMakeLists.txt b/src/wayland/toplevel/CMakeLists.txt index 0c1d555..4b66271 100644 --- a/src/wayland/toplevel/CMakeLists.txt +++ b/src/wayland/toplevel/CMakeLists.txt @@ -10,7 +10,8 @@ qt_add_qml_module(quickshell-wayland-toplevel-management ) qs_add_module_deps_light(quickshell-wayland-toplevel-management - Quickshell Quickshell.Wayland + quickshell-core + URIS Quickshell.Wayland ) install_qml_module(quickshell-wayland-toplevel-management) diff --git a/src/wayland/wlr_layershell/CMakeLists.txt b/src/wayland/wlr_layershell/CMakeLists.txt index 444f512..752c2cb 100644 --- a/src/wayland/wlr_layershell/CMakeLists.txt +++ b/src/wayland/wlr_layershell/CMakeLists.txt @@ -10,7 +10,10 @@ qt_add_qml_module(quickshell-wayland-layershell DEPENDENCIES QtQuick ) -qs_add_module_deps_light(quickshell-wayland-layershell Quickshell Quickshell.Wayland) +qs_add_module_deps_light(quickshell-wayland-layershell + quickshell-core quickshell-window + URIS Quickshell.Wayland +) install_qml_module(quickshell-wayland-layershell) diff --git a/src/window/CMakeLists.txt b/src/window/CMakeLists.txt index 47b546d..eded4cd 100644 --- a/src/window/CMakeLists.txt +++ b/src/window/CMakeLists.txt @@ -12,7 +12,7 @@ qt_add_qml_module(quickshell-window DEPENDENCIES QtQuick ) -qs_add_module_deps_light(quickshell-window Quickshell) +qs_add_module_deps_light(quickshell-window quickshell-core) install_qml_module(quickshell-window) diff --git a/src/windowmanager/CMakeLists.txt b/src/windowmanager/CMakeLists.txt index 3c032f4..9833b5e 100644 --- a/src/windowmanager/CMakeLists.txt +++ b/src/windowmanager/CMakeLists.txt @@ -10,7 +10,7 @@ qt_add_qml_module(quickshell-windowmanager DEPENDENCIES QtQuick ) -qs_add_module_deps_light(quickshell-windowmanager Quickshell) +qs_add_module_deps_light(quickshell-windowmanager quickshell-core) install_qml_module(quickshell-windowmanager) diff --git a/src/x11/CMakeLists.txt b/src/x11/CMakeLists.txt index b37b8fb..50b7c35 100644 --- a/src/x11/CMakeLists.txt +++ b/src/x11/CMakeLists.txt @@ -11,6 +11,8 @@ qt_add_qml_module(quickshell-x11 DEPENDENCIES QtQuick ) +qs_add_module_deps_light(quickshell-x11 quickshell-core quickshell-window) + install_qml_module(quickshell-x11) add_library(quickshell-x11-init OBJECT init.cpp) diff --git a/src/x11/i3/ipc/CMakeLists.txt b/src/x11/i3/ipc/CMakeLists.txt index a073459..afece59 100644 --- a/src/x11/i3/ipc/CMakeLists.txt +++ b/src/x11/i3/ipc/CMakeLists.txt @@ -13,7 +13,7 @@ qt_add_qml_module(quickshell-i3-ipc DEPENDENCIES QtQml ) -qs_add_module_deps_light(quickshell-i3-ipc Quickshell) +qs_add_module_deps_light(quickshell-i3-ipc quickshell-core) install_qml_module(quickshell-i3-ipc)