forked from quickshell/quickshell
all: use UntypedObjectModel instead of ObjectModel in Q_PROPERTY
Fixes qmllint/qmlls type deduction for ObjectModels
This commit is contained in:
parent
746b0e70d7
commit
98cdb87181
9 changed files with 33 additions and 11 deletions
|
@ -5,6 +5,7 @@
|
|||
#include <qqmlintegration.h>
|
||||
#include <qtmetamacros.h>
|
||||
|
||||
#include "../../../core/doc.hpp"
|
||||
#include "../../../core/model.hpp"
|
||||
#include "../../../core/qmlscreen.hpp"
|
||||
#include "connection.hpp"
|
||||
|
@ -22,9 +23,11 @@ class HyprlandIpcQml: public QObject {
|
|||
/// The currently focused hyprland monitor. May be null.
|
||||
Q_PROPERTY(qs::hyprland::ipc::HyprlandMonitor* focusedMonitor READ focusedMonitor NOTIFY focusedMonitorChanged);
|
||||
/// All hyprland monitors.
|
||||
Q_PROPERTY(ObjectModel<qs::hyprland::ipc::HyprlandMonitor>* monitors READ monitors CONSTANT);
|
||||
QSDOC_TYPE_OVERRIDE(ObjectModel<qs::hyprland::ipc::HyprlandMonitor>*);
|
||||
Q_PROPERTY(UntypedObjectModel* monitors READ monitors CONSTANT);
|
||||
/// All hyprland workspaces.
|
||||
Q_PROPERTY(ObjectModel<qs::hyprland::ipc::HyprlandWorkspace>* workspaces READ workspaces CONSTANT);
|
||||
QSDOC_TYPE_OVERRIDE(ObjectModel<qs::hyprland::ipc::HyprlandWorkspace>*);
|
||||
Q_PROPERTY(UntypedObjectModel* workspaces READ workspaces CONSTANT);
|
||||
// clang-format on
|
||||
QML_NAMED_ELEMENT(Hyprland);
|
||||
QML_SINGLETON;
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
#include <qqmlintegration.h>
|
||||
#include <qtmetamacros.h>
|
||||
|
||||
#include "../../core/doc.hpp"
|
||||
#include "../../core/model.hpp"
|
||||
#include "../../core/qmlscreen.hpp"
|
||||
#include "../../core/util.hpp"
|
||||
|
@ -143,7 +144,8 @@ class ToplevelManagerQml: public QObject {
|
|||
Q_OBJECT;
|
||||
// clang-format off
|
||||
/// All toplevel windows exposed by the compositor.
|
||||
Q_PROPERTY(ObjectModel<qs::wayland::toplevel_management::Toplevel>* toplevels READ toplevels CONSTANT);
|
||||
QSDOC_TYPE_OVERRIDE(ObjectModel<qs::wayland::toplevel_management::Toplevel>*);
|
||||
Q_PROPERTY(UntypedObjectModel* toplevels READ toplevels CONSTANT);
|
||||
/// Active toplevel or null.
|
||||
///
|
||||
/// > [!INFO] If multiple are active, this will be the most recently activated one.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue