Repository navigation
Expand file tree
/
Copy pathqt612-moc-fix.patch
More file actions
303 lines (253 loc) · 11.3 KB
/
Copy pathqt612-moc-fix.patch
File metadata and controls
303 lines (253 loc) · 11.3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
diff --git a/src/services/pipewire/peak.hpp b/src/services/pipewire/peak.hpp
index a66b908..6f5e547 100644
--- a/src/services/pipewire/peak.hpp
+++ b/src/services/pipewire/peak.hpp
@@ -9,18 +9,12 @@
#include <qvector.h>
#include "node.hpp"
+#include "qml.hpp"
namespace qs::service::pipewire {
-class PwNodeIface;
class PwPeakStream;
-} // namespace qs::service::pipewire
-
-Q_DECLARE_OPAQUE_POINTER(qs::service::pipewire::PwNodeIface*);
-
-namespace qs::service::pipewire {
-
///! Monitors peak levels of an audio node.
/// Tracks volume peaks for a node across all its channels.
///
diff --git a/src/services/pipewire/spectrum.hpp b/src/services/pipewire/spectrum.hpp
index ca5e35a..5d8c1a8 100644
--- a/src/services/pipewire/spectrum.hpp
+++ b/src/services/pipewire/spectrum.hpp
@@ -13,10 +13,10 @@
#include <qtypes.h>
#include "node.hpp"
+#include "qml.hpp"
namespace qs::service::pipewire {
-class PwNodeIface;
class PwSpectrumStream;
diff --git a/src/wayland/hyprland/ipc/connection.cpp b/src/wayland/hyprland/ipc/connection.cpp
index 3d7a397..2519dac 100644
--- a/src/wayland/hyprland/ipc/connection.cpp
+++ b/src/wayland/hyprland/ipc/connection.cpp
@@ -37,6 +37,18 @@ QS_LOGGING_CATEGORY(logHyprlandIpc, "quickshell.hyprland.ipc", QtWarningMsg);
QS_LOGGING_CATEGORY(logHyprlandIpcEvents, "quickshell.hyprland.ipc.events", QtWarningMsg);
} // namespace
+QBindable<HyprlandMonitor*> HyprlandIpc::bindableFocusedMonitor() const {
+ return &this->bFocusedMonitor;
+}
+
+QBindable<HyprlandWorkspace*> HyprlandIpc::bindableFocusedWorkspace() const {
+ return &this->bFocusedWorkspace;
+}
+
+QBindable<HyprlandToplevel*> HyprlandIpc::bindableActiveToplevel() const {
+ return &this->bActiveToplevel;
+}
+
HyprlandIpc::HyprlandIpc() {
auto his = qEnvironmentVariable("HYPRLAND_INSTANCE_SIGNATURE");
if (his.isEmpty()) {
diff --git a/src/wayland/hyprland/ipc/connection.hpp b/src/wayland/hyprland/ipc/connection.hpp
index ba1e7c9..945c4d5 100644
--- a/src/wayland/hyprland/ipc/connection.hpp
+++ b/src/wayland/hyprland/ipc/connection.hpp
@@ -25,9 +25,9 @@ class HyprlandToplevel;
} // namespace qs::hyprland::ipc
-Q_DECLARE_OPAQUE_POINTER(qs::hyprland::ipc::HyprlandWorkspace*);
-Q_DECLARE_OPAQUE_POINTER(qs::hyprland::ipc::HyprlandMonitor*);
-Q_DECLARE_OPAQUE_POINTER(qs::hyprland::ipc::HyprlandToplevel*);
+Q_MOC_INCLUDE("hyprland_toplevel.hpp")
+Q_MOC_INCLUDE("monitor.hpp")
+Q_MOC_INCLUDE("workspace.hpp")
namespace qs::hyprland::ipc {
@@ -81,17 +81,9 @@ public:
[[nodiscard]] HyprlandMonitor* monitorFor(QuickshellScreenInfo* screen);
- [[nodiscard]] QBindable<HyprlandMonitor*> bindableFocusedMonitor() const {
- return &this->bFocusedMonitor;
- }
-
- [[nodiscard]] QBindable<HyprlandWorkspace*> bindableFocusedWorkspace() const {
- return &this->bFocusedWorkspace;
- }
-
- [[nodiscard]] QBindable<HyprlandToplevel*> bindableActiveToplevel() const {
- return &this->bActiveToplevel;
- }
+ [[nodiscard]] QBindable<HyprlandMonitor*> bindableFocusedMonitor() const;
+ [[nodiscard]] QBindable<HyprlandWorkspace*> bindableFocusedWorkspace() const;
+ [[nodiscard]] QBindable<HyprlandToplevel*> bindableActiveToplevel() const;
void setFocusedMonitor(HyprlandMonitor* monitor);
diff --git a/src/wayland/hyprland/ipc/hyprland_toplevel.cpp b/src/wayland/hyprland/ipc/hyprland_toplevel.cpp
index 43b9838..524fee1 100644
--- a/src/wayland/hyprland/ipc/hyprland_toplevel.cpp
+++ b/src/wayland/hyprland/ipc/hyprland_toplevel.cpp
@@ -8,6 +8,7 @@
#include "../../toplevel_management/qml.hpp"
#include "connection.hpp"
+#include "monitor.hpp"
#include "toplevel_mapping.hpp"
#include "workspace.hpp"
@@ -15,6 +16,10 @@ using namespace qs::wayland::toplevel_management;
namespace qs::hyprland::ipc {
+QBindable<HyprlandWorkspace*> HyprlandToplevel::bindableWorkspace() { return &this->bWorkspace; }
+
+QBindable<HyprlandMonitor*> HyprlandToplevel::bindableMonitor() { return &this->bMonitor; }
+
HyprlandToplevel::HyprlandToplevel(HyprlandIpc* ipc): QObject(ipc), ipc(ipc) {
this->bMonitor.setBinding([this]() {
return this->bWorkspace ? this->bWorkspace->bindableMonitor().value() : nullptr;
diff --git a/src/wayland/hyprland/ipc/hyprland_toplevel.hpp b/src/wayland/hyprland/ipc/hyprland_toplevel.hpp
index ebd4f84..404ce87 100644
--- a/src/wayland/hyprland/ipc/hyprland_toplevel.hpp
+++ b/src/wayland/hyprland/ipc/hyprland_toplevel.hpp
@@ -81,10 +81,10 @@ public:
return &this->bLastIpcObject;
};
- [[nodiscard]] QBindable<HyprlandWorkspace*> bindableWorkspace() { return &this->bWorkspace; }
+ [[nodiscard]] QBindable<HyprlandWorkspace*> bindableWorkspace();
void setWorkspace(HyprlandWorkspace* workspace);
- [[nodiscard]] QBindable<HyprlandMonitor*> bindableMonitor() { return &this->bMonitor; }
+ [[nodiscard]] QBindable<HyprlandMonitor*> bindableMonitor();
signals:
void addressChanged();
diff --git a/src/wayland/hyprland/ipc/monitor.cpp b/src/wayland/hyprland/ipc/monitor.cpp
index ddf3706..3b753dd 100644
--- a/src/wayland/hyprland/ipc/monitor.cpp
+++ b/src/wayland/hyprland/ipc/monitor.cpp
@@ -13,6 +13,10 @@ namespace qs::hyprland::ipc {
QVariantMap HyprlandMonitor::lastIpcObject() const { return this->mLastIpcObject; }
+QBindable<HyprlandWorkspace*> HyprlandMonitor::bindableActiveWorkspace() const {
+ return &this->bActiveWorkspace;
+}
+
void HyprlandMonitor::updateInitial(qint32 id, const QString& name, const QString& description) {
Qt::beginPropertyUpdateGroup();
this->bId = id;
diff --git a/src/wayland/hyprland/ipc/monitor.hpp b/src/wayland/hyprland/ipc/monitor.hpp
index b9ac434..d368adf 100644
--- a/src/wayland/hyprland/ipc/monitor.hpp
+++ b/src/wayland/hyprland/ipc/monitor.hpp
@@ -54,9 +54,7 @@ public:
[[nodiscard]] QBindable<qint32> bindableHeight() { return &this->bHeight; }
[[nodiscard]] QBindable<qreal> bindableScale() { return &this->bScale; }
- [[nodiscard]] QBindable<HyprlandWorkspace*> bindableActiveWorkspace() const {
- return &this->bActiveWorkspace;
- }
+ [[nodiscard]] QBindable<HyprlandWorkspace*> bindableActiveWorkspace() const;
[[nodiscard]] QBindable<bool> bindableFocused() const { return &this->bFocused; }
diff --git a/src/wayland/hyprland/ipc/workspace.cpp b/src/wayland/hyprland/ipc/workspace.cpp
index c5d63b0..f1ab6e4 100644
--- a/src/wayland/hyprland/ipc/workspace.cpp
+++ b/src/wayland/hyprland/ipc/workspace.cpp
@@ -15,6 +15,8 @@ namespace qs::hyprland::ipc {
QVariantMap HyprlandWorkspace::lastIpcObject() const { return this->mLastIpcObject; }
+QBindable<HyprlandMonitor*> HyprlandWorkspace::bindableMonitor() { return &this->bMonitor; }
+
HyprlandWorkspace::HyprlandWorkspace(HyprlandIpc* ipc): QObject(ipc), ipc(ipc) {
Qt::beginPropertyUpdateGroup();
diff --git a/src/wayland/hyprland/ipc/workspace.hpp b/src/wayland/hyprland/ipc/workspace.hpp
index a0b09cf..3a3a710 100644
--- a/src/wayland/hyprland/ipc/workspace.hpp
+++ b/src/wayland/hyprland/ipc/workspace.hpp
@@ -64,7 +64,7 @@ public:
[[nodiscard]] QBindable<bool> bindableFocused() { return &this->bFocused; }
[[nodiscard]] QBindable<bool> bindableUrgent() { return &this->bUrgent; }
[[nodiscard]] QBindable<bool> bindableHasFullscreen() { return &this->bHasFullscreen; }
- [[nodiscard]] QBindable<HyprlandMonitor*> bindableMonitor() { return &this->bMonitor; }
+ [[nodiscard]] QBindable<HyprlandMonitor*> bindableMonitor();
[[nodiscard]] ObjectModel<HyprlandToplevel>* toplevels() { return &this->mToplevels; }
[[nodiscard]] QVariantMap lastIpcObject() const;
diff --git a/src/x11/i3/ipc/controller.cpp b/src/x11/i3/ipc/controller.cpp
index 30b0fe1..4e39847 100644
--- a/src/x11/i3/ipc/controller.cpp
+++ b/src/x11/i3/ipc/controller.cpp
@@ -31,6 +31,14 @@ QS_LOGGING_CATEGORY(logI3Ipc, "quickshell.I3.ipc", QtWarningMsg);
QS_LOGGING_CATEGORY(logI3IpcEvents, "quickshell.I3.ipc.events", QtWarningMsg);
} // namespace
+QBindable<I3Monitor*> I3IpcController::bindableFocusedMonitor() const {
+ return &this->bFocusedMonitor;
+}
+
+QBindable<I3Workspace*> I3IpcController::bindableFocusedWorkspace() const {
+ return &this->bFocusedWorkspace;
+}
+
I3IpcController::I3IpcController(): I3Ipc({"workspace", "output"}) {
// bind focused workspace to focused monitor's active workspace
this->bFocusedWorkspace.setBinding([this]() -> I3Workspace* {
diff --git a/src/x11/i3/ipc/controller.hpp b/src/x11/i3/ipc/controller.hpp
index 464f6f6..9e9d914 100644
--- a/src/x11/i3/ipc/controller.hpp
+++ b/src/x11/i3/ipc/controller.hpp
@@ -20,8 +20,8 @@ class I3Workspace;
class I3Monitor;
} // namespace qs::i3::ipc
-Q_DECLARE_OPAQUE_POINTER(qs::i3::ipc::I3Workspace*);
-Q_DECLARE_OPAQUE_POINTER(qs::i3::ipc::I3Monitor*);
+Q_MOC_INCLUDE("monitor.hpp")
+Q_MOC_INCLUDE("workspace.hpp")
namespace qs::i3::ipc {
@@ -43,13 +43,8 @@ public:
I3Monitor* monitorFor(QuickshellScreenInfo* screen);
- [[nodiscard]] QBindable<I3Monitor*> bindableFocusedMonitor() const {
- return &this->bFocusedMonitor;
- };
-
- [[nodiscard]] QBindable<I3Workspace*> bindableFocusedWorkspace() const {
- return &this->bFocusedWorkspace;
- };
+ [[nodiscard]] QBindable<I3Monitor*> bindableFocusedMonitor() const;
+ [[nodiscard]] QBindable<I3Workspace*> bindableFocusedWorkspace() const;
[[nodiscard]] ObjectModel<I3Monitor>* monitors();
[[nodiscard]] ObjectModel<I3Workspace>* workspaces();
diff --git a/src/x11/i3/ipc/monitor.cpp b/src/x11/i3/ipc/monitor.cpp
index ed5506d..f4ecb5a 100644
--- a/src/x11/i3/ipc/monitor.cpp
+++ b/src/x11/i3/ipc/monitor.cpp
@@ -12,6 +12,10 @@
namespace qs::i3::ipc {
+QBindable<I3Workspace*> I3Monitor::bindableActiveWorkspace() const {
+ return &this->bActiveWorkspace;
+}
+
I3Monitor::I3Monitor(I3IpcController* ipc): QObject(ipc), ipc(ipc) {
// clang-format off
this->bFocused.setBinding([this]() { return this->ipc->bindableFocusedMonitor().value() == this; });
diff --git a/src/x11/i3/ipc/monitor.hpp b/src/x11/i3/ipc/monitor.hpp
index 3ed9617..2fdc5ec 100644
--- a/src/x11/i3/ipc/monitor.hpp
+++ b/src/x11/i3/ipc/monitor.hpp
@@ -55,9 +55,7 @@ public:
[[nodiscard]] QBindable<qreal> bindableScale() { return &this->bScale; }
[[nodiscard]] QBindable<bool> bindableFocused() { return &this->bFocused; }
- [[nodiscard]] QBindable<I3Workspace*> bindableActiveWorkspace() {
- return &this->bActiveWorkspace;
- }
+ [[nodiscard]] QBindable<I3Workspace*> bindableActiveWorkspace() const;
[[nodiscard]] QVariantMap lastIpcObject() const;
diff --git a/src/x11/i3/ipc/workspace.cpp b/src/x11/i3/ipc/workspace.cpp
index 632fdfa..0bfd756 100644
--- a/src/x11/i3/ipc/workspace.cpp
+++ b/src/x11/i3/ipc/workspace.cpp
@@ -12,6 +12,8 @@
namespace qs::i3::ipc {
+QBindable<I3Monitor*> I3Workspace::bindableMonitor() const { return &this->bMonitor; }
+
I3Workspace::I3Workspace(I3IpcController* ipc): QObject(ipc), ipc(ipc) {
Qt::beginPropertyUpdateGroup();
diff --git a/src/x11/i3/ipc/workspace.hpp b/src/x11/i3/ipc/workspace.hpp
index 8824cbe..85ecfb7 100644
--- a/src/x11/i3/ipc/workspace.hpp
+++ b/src/x11/i3/ipc/workspace.hpp
@@ -57,7 +57,7 @@ public:
[[nodiscard]] QBindable<bool> bindableActive() { return &this->bActive; }
[[nodiscard]] QBindable<bool> bindableFocused() { return &this->bFocused; }
[[nodiscard]] QBindable<bool> bindableUrgent() { return &this->bUrgent; }
- [[nodiscard]] QBindable<I3Monitor*> bindableMonitor() { return &this->bMonitor; }
+ [[nodiscard]] QBindable<I3Monitor*> bindableMonitor() const;
[[nodiscard]] QVariantMap lastIpcObject() const;
void updateFromObject(const QVariantMap& obj);