From 4d8055f1cd9924bcace59405894b8879633eb83d Mon Sep 17 00:00:00 2001 From: outfoxxed Date: Tue, 15 Jul 2025 19:03:27 -0700 Subject: [PATCH] build: fix PostReloadHook resolution in LSP --- src/core/reload.hpp | 4 ++++ src/io/CMakeLists.txt | 1 + src/io/jsonadapter.hpp | 1 + src/services/notifications/CMakeLists.txt | 1 - src/services/notifications/notification.hpp | 6 +++++- src/services/pam/qml.hpp | 4 +++- src/wayland/hyprland/CMakeLists.txt | 1 + src/wayland/hyprland/focus_grab/qml.hpp | 3 ++- src/widgets/wrapper.hpp | 4 +++- 9 files changed, 20 insertions(+), 5 deletions(-) diff --git a/src/core/reload.hpp b/src/core/reload.hpp index 1d4e3751..1117eb81 100644 --- a/src/core/reload.hpp +++ b/src/core/reload.hpp @@ -122,6 +122,10 @@ private: class PostReloadHook : public QObject , public QQmlParserStatus { + Q_OBJECT; + QML_ANONYMOUS; + Q_INTERFACES(QQmlParserStatus); + public: PostReloadHook(QObject* parent = nullptr): QObject(parent) {} void classBegin() override {} diff --git a/src/io/CMakeLists.txt b/src/io/CMakeLists.txt index 8b5c20a1..17628d38 100644 --- a/src/io/CMakeLists.txt +++ b/src/io/CMakeLists.txt @@ -21,6 +21,7 @@ qt_add_qml_module(quickshell-io FileView.qml ) +qs_add_module_deps_light(quickshell-io Quickshell) install_qml_module(quickshell-io) target_link_libraries(quickshell-io PRIVATE Qt::Quick) diff --git a/src/io/jsonadapter.hpp b/src/io/jsonadapter.hpp index a447c419..276d6a7f 100644 --- a/src/io/jsonadapter.hpp +++ b/src/io/jsonadapter.hpp @@ -91,6 +91,7 @@ class JsonAdapter , public QQmlParserStatus { Q_OBJECT; QML_ELEMENT; + Q_INTERFACES(QQmlParserStatus); public: void classBegin() override {} diff --git a/src/services/notifications/CMakeLists.txt b/src/services/notifications/CMakeLists.txt index 0cbb42eb..58b6648c 100644 --- a/src/services/notifications/CMakeLists.txt +++ b/src/services/notifications/CMakeLists.txt @@ -23,7 +23,6 @@ qt_add_qml_module(quickshell-service-notifications ) qs_add_module_deps_light(quickshell-service-notifications Quickshell) - install_qml_module(quickshell-service-notifications) target_link_libraries(quickshell-service-notifications PRIVATE Qt::Quick Qt::DBus) diff --git a/src/services/notifications/notification.hpp b/src/services/notifications/notification.hpp index 06c871bb..fc3f30be 100644 --- a/src/services/notifications/notification.hpp +++ b/src/services/notifications/notification.hpp @@ -171,7 +171,11 @@ public: [[nodiscard]] QBindable bindableDesktopEntry() const { return &this->bDesktopEntry; }; [[nodiscard]] QBindable bindableImage() const { return &this->bImage; }; [[nodiscard]] QBindable bindableHasInlineReply() const { return &this->bHasInlineReply; }; - [[nodiscard]] QBindable bindableInlineReplyPlaceholder() const { return &this->bInlineReplyPlaceholder; }; + + [[nodiscard]] QBindable bindableInlineReplyPlaceholder() const { + return &this->bInlineReplyPlaceholder; + }; + [[nodiscard]] QBindable bindableHints() const { return &this->bHints; }; [[nodiscard]] NotificationCloseReason::Enum closeReason() const; diff --git a/src/services/pam/qml.hpp b/src/services/pam/qml.hpp index 805e04c2..a8ffcc35 100644 --- a/src/services/pam/qml.hpp +++ b/src/services/pam/qml.hpp @@ -17,6 +17,9 @@ class PamContext : public QObject , public QQmlParserStatus { Q_OBJECT; + QML_ELEMENT; + Q_INTERFACES(QQmlParserStatus); + // clang-format off /// If the pam context is actively performing an authentication. /// @@ -49,7 +52,6 @@ class PamContext /// If the user's response should be visible. Only valid when @@responseRequired is true. Q_PROPERTY(bool responseVisible READ isResponseVisible NOTIFY responseVisibleChanged); // clang-format on - QML_ELEMENT; public: explicit PamContext(QObject* parent = nullptr): QObject(parent) {} diff --git a/src/wayland/hyprland/CMakeLists.txt b/src/wayland/hyprland/CMakeLists.txt index 570cbe54..66b32b6f 100644 --- a/src/wayland/hyprland/CMakeLists.txt +++ b/src/wayland/hyprland/CMakeLists.txt @@ -30,6 +30,7 @@ qt_add_qml_module(quickshell-hyprland IMPORTS ${HYPRLAND_MODULES} ) +qs_add_module_deps_light(quickshell-io Quickshell) install_qml_module(quickshell-hyprland) # intentionally no pch as the module is empty diff --git a/src/wayland/hyprland/focus_grab/qml.hpp b/src/wayland/hyprland/focus_grab/qml.hpp index 4ba7227d..705b0d3d 100644 --- a/src/wayland/hyprland/focus_grab/qml.hpp +++ b/src/wayland/hyprland/focus_grab/qml.hpp @@ -56,6 +56,8 @@ class HyprlandFocusGrab : public QObject , public QQmlParserStatus { Q_OBJECT; + QML_ELEMENT; + Q_INTERFACES(QQmlParserStatus); /// If the focus grab is active. Defaults to false. /// /// When set to true, an input grab will be created for the listed windows. @@ -66,7 +68,6 @@ class HyprlandFocusGrab Q_PROPERTY(bool active READ isActive WRITE setActive NOTIFY activeChanged); /// The list of windows to whitelist for input. Q_PROPERTY(QList windows READ windows WRITE setWindows NOTIFY windowsChanged); - QML_ELEMENT; public: explicit HyprlandFocusGrab(QObject* parent = nullptr): QObject(parent) {} diff --git a/src/widgets/wrapper.hpp b/src/widgets/wrapper.hpp index d506750c..f0a2a138 100644 --- a/src/widgets/wrapper.hpp +++ b/src/widgets/wrapper.hpp @@ -85,6 +85,9 @@ class WrapperManager : public QObject , public QQmlParserStatus { Q_OBJECT; + QML_ELEMENT; + Q_INTERFACES(QQmlParserStatus); + // clang-format off /// The wrapper component's selected child. /// @@ -102,7 +105,6 @@ class WrapperManager /// This property may not be changed after Component.onCompleted. Q_PROPERTY(QQuickItem* wrapper READ wrapper WRITE setWrapper NOTIFY wrapperChanged FINAL); // clang-format on - QML_ELEMENT; public: explicit WrapperManager(QObject* parent = nullptr): QObject(parent) {}