mirror of
https://git.outfoxxed.me/quickshell/quickshell.git
synced 2025-11-04 19:04:56 +11:00
all: use fully qualified type names in Q_PROPERTY
Fixes type deduction issues with qmllint/qmlls.
This commit is contained in:
parent
a931adf033
commit
746b0e70d7
14 changed files with 52 additions and 40 deletions
|
|
@ -13,6 +13,7 @@ namespace qs::hyprland::ipc {
|
|||
|
||||
class HyprlandMonitor: public QObject {
|
||||
Q_OBJECT;
|
||||
// clang-format off
|
||||
Q_PROPERTY(qint32 id READ id NOTIFY idChanged);
|
||||
Q_PROPERTY(QString name READ name NOTIFY nameChanged);
|
||||
Q_PROPERTY(QString description READ description NOTIFY descriptionChanged);
|
||||
|
|
@ -28,7 +29,8 @@ class HyprlandMonitor: public QObject {
|
|||
/// > property, run @@Hyprland.refreshMonitors() and wait for this property to update.
|
||||
Q_PROPERTY(QVariantMap lastIpcObject READ lastIpcObject NOTIFY lastIpcObjectChanged);
|
||||
/// The currently active workspace on this monitor. May be null.
|
||||
Q_PROPERTY(HyprlandWorkspace* activeWorkspace READ activeWorkspace NOTIFY activeWorkspaceChanged);
|
||||
Q_PROPERTY(qs::hyprland::ipc::HyprlandWorkspace* activeWorkspace READ activeWorkspace NOTIFY activeWorkspaceChanged);
|
||||
// clang-format on
|
||||
QML_ELEMENT;
|
||||
QML_UNCREATABLE("HyprlandMonitors must be retrieved from the HyprlandIpc object.");
|
||||
|
||||
|
|
|
|||
|
|
@ -14,16 +14,18 @@ namespace qs::hyprland::ipc {
|
|||
|
||||
class HyprlandIpcQml: public QObject {
|
||||
Q_OBJECT;
|
||||
// clang-format off
|
||||
/// Path to the request socket (.socket.sock)
|
||||
Q_PROPERTY(QString requestSocketPath READ requestSocketPath CONSTANT);
|
||||
/// Path to the event socket (.socket2.sock)
|
||||
Q_PROPERTY(QString eventSocketPath READ eventSocketPath CONSTANT);
|
||||
/// The currently focused hyprland monitor. May be null.
|
||||
Q_PROPERTY(HyprlandMonitor* focusedMonitor READ focusedMonitor NOTIFY focusedMonitorChanged);
|
||||
Q_PROPERTY(qs::hyprland::ipc::HyprlandMonitor* focusedMonitor READ focusedMonitor NOTIFY focusedMonitorChanged);
|
||||
/// All hyprland monitors.
|
||||
Q_PROPERTY(ObjectModel<HyprlandMonitor>* monitors READ monitors CONSTANT);
|
||||
Q_PROPERTY(ObjectModel<qs::hyprland::ipc::HyprlandMonitor>* monitors READ monitors CONSTANT);
|
||||
/// All hyprland workspaces.
|
||||
Q_PROPERTY(ObjectModel<HyprlandWorkspace>* workspaces READ workspaces CONSTANT);
|
||||
Q_PROPERTY(ObjectModel<qs::hyprland::ipc::HyprlandWorkspace>* workspaces READ workspaces CONSTANT);
|
||||
// clang-format on
|
||||
QML_NAMED_ELEMENT(Hyprland);
|
||||
QML_SINGLETON;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue