diff options
| author | 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> | 2025-10-14 16:00:17 +1100 |
|---|---|---|
| committer | 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> | 2025-10-14 16:00:17 +1100 |
| commit | 27953a89d1110d6cc82ff198e1c28f698104d554 (patch) | |
| tree | 69b302d1f8c0150c9a61e57dad9b0dd80ff11e48 /plugin/src/Caelestia/Internal/hyprdevices.hpp | |
| parent | toasts: add toast for kb layout change (diff) | |
| download | caelestia-shell-27953a89d1110d6cc82ff198e1c28f698104d554.tar.gz caelestia-shell-27953a89d1110d6cc82ff198e1c28f698104d554.tar.bz2 caelestia-shell-27953a89d1110d6cc82ff198e1c28f698104d554.zip | |
internal: use QQmlListProperty
Fix lsp errors
Diffstat (limited to 'plugin/src/Caelestia/Internal/hyprdevices.hpp')
| -rw-r--r-- | plugin/src/Caelestia/Internal/hyprdevices.hpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/plugin/src/Caelestia/Internal/hyprdevices.hpp b/plugin/src/Caelestia/Internal/hyprdevices.hpp index e10df46..da18063 100644 --- a/plugin/src/Caelestia/Internal/hyprdevices.hpp +++ b/plugin/src/Caelestia/Internal/hyprdevices.hpp @@ -3,6 +3,7 @@ #include <qjsonobject.h> #include <qobject.h> #include <qqmlintegration.h> +#include <qqmllist.h> namespace caelestia::internal::hypr { @@ -53,12 +54,13 @@ class HyprDevices : public QObject { QML_ELEMENT QML_UNCREATABLE("HyprDevices instances can only be retrieved from a HyprExtras") - Q_PROPERTY(QList<HyprKeyboard*> keyboards READ keyboards NOTIFY keyboardsChanged) + Q_PROPERTY( + QQmlListProperty<caelestia::internal::hypr::HyprKeyboard> keyboards READ keyboards NOTIFY keyboardsChanged) public: explicit HyprDevices(QObject* parent = nullptr); - [[nodiscard]] QList<HyprKeyboard*> keyboards() const; + [[nodiscard]] QQmlListProperty<HyprKeyboard> keyboards(); bool updateLastIpcObject(QJsonObject object); |