Skip to content

Commit c85dfc6

Browse files
authored
fix: format ci (#1513)
* fix: remove _-prefixed ids qmlformat crashes cause of them * fix: pin ci image to Qt 6.11.0 6.11.1 is the broken qmlformat version * chore: format c++ * ci: print tool versions at start of ci
1 parent 2b63ffe commit c85dfc6

6 files changed

Lines changed: 53 additions & 43 deletions

File tree

.github/workflows/check-format.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ jobs:
1818
- name: Check QML format
1919
shell: fish {0}
2020
run: |
21+
/usr/lib/qt6/bin/qmlformat --version
2122
for file in (string match -v 'build/*' **.qml)
2223
/usr/lib/qt6/bin/qmlformat $file | diff -u $file - || exit 1
2324
end
@@ -34,5 +35,6 @@ jobs:
3435
- name: Check C++ format
3536
shell: fish {0}
3637
run: |
38+
clang-format --version
3739
find plugin extras -name '*.cpp' -o -name '*.hpp' \
3840
| xargs clang-format --dry-run --Werror

.github/workflows/lint.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ jobs:
2525
- name: Lint QML
2626
shell: fish {0}
2727
run: |
28+
/usr/lib/qt6/bin/qmllint --version
29+
2830
# Generate tooling
2931
touch .qmlls.ini
3032
QT_QPA_PLATFORM=offscreen QML2_IMPORT_PATH="$PWD/build/qml:$QML2_IMPORT_PATH" timeout 2 qs -p .

.github/workflows/update-image.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,13 @@ jobs:
2323
run: |
2424
cat > /tmp/Dockerfile <<EOF
2525
FROM archlinux:latest
26-
RUN pacman -Syu --needed --noconfirm sudo base-devel cmake ninja fish git clazy qt6-declarative qt6-shadertools python libpipewire aubio libqalculate && \
26+
# TEMPORARY (remove once the upstream qmlformat regression is fixed): pin to the
27+
# 2026-05-13 Arch archive snapshot to hold qmlformat at qt6-declarative 6.11.0.
28+
# qt6-declarative 6.11.1 silently crashes qmlformat (exit 1, empty output) on QML files
29+
# that declare a property named 'id'. To unpin: delete the mirrorlist line below and
30+
# change 'pacman -Syyuu' back to 'pacman -Syu'.
31+
RUN echo 'Server = https://archive.archlinux.org/repos/2026/05/13/\$repo/os/\$arch' > /etc/pacman.d/mirrorlist && \
32+
pacman -Syyuu --needed --noconfirm sudo base-devel cmake ninja fish git clazy qt6-declarative qt6-shadertools python libpipewire aubio libqalculate && \
2733
useradd -m builder && \
2834
echo 'builder ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers && \
2935
sudo -u builder git clone https://aur.archlinux.org/yay-bin.git /home/builder/yay-bin && \

modules/bar/popouts/kblayout/KbLayoutModel.qml

Lines changed: 34 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -10,25 +10,25 @@ import Caelestia.Config
1010
Item {
1111
id: model
1212

13-
property alias visibleModel: _visibleModel
13+
property alias visibleModel: visibleModel
1414
property string activeLabel: ""
1515
property int activeIndex: -1
1616
property var _xkbMap: ({})
1717
property bool _notifiedLimit: false
1818

1919
function start() {
20-
_xkbXmlBase.running = true;
21-
_getKbLayoutOpt.running = true;
20+
xkbXmlBase.running = true;
21+
getKbLayoutOpt.running = true;
2222
}
2323

2424
function refresh() {
2525
_notifiedLimit = false;
26-
_getKbLayoutOpt.running = true;
26+
getKbLayoutOpt.running = true;
2727
}
2828

2929
function switchTo(idx) {
30-
_switchProc.command = ["hyprctl", "switchxkblayout", "all", String(idx)];
31-
_switchProc.running = true;
30+
switchProc.command = ["hyprctl", "switchxkblayout", "all", String(idx)];
31+
switchProc.running = true;
3232
}
3333

3434
function _buildXmlMap(xml) {
@@ -50,19 +50,19 @@ Item {
5050

5151
_xkbMap = map;
5252

53-
if (_layoutsModel.count > 0) {
53+
if (layoutsModel.count > 0) {
5454
const tmp = [];
55-
for (let i = 0; i < _layoutsModel.count; i++) {
56-
const it = _layoutsModel.get(i);
55+
for (let i = 0; i < layoutsModel.count; i++) {
56+
const it = layoutsModel.get(i);
5757
tmp.push({
5858
layoutIndex: it.layoutIndex,
5959
token: it.token,
6060
label: _pretty(it.token)
6161
});
6262
}
63-
_layoutsModel.clear();
64-
tmp.forEach(t => _layoutsModel.append(t));
65-
_fetchActiveLayouts.running = true;
63+
layoutsModel.clear();
64+
tmp.forEach(t => layoutsModel.append(t));
65+
fetchActiveLayouts.running = true;
6666
}
6767
}
6868

@@ -78,7 +78,7 @@ Item {
7878

7979
function _setLayouts(raw) {
8080
const parts = raw.split(",").map(s => s.trim()).filter(Boolean);
81-
_layoutsModel.clear();
81+
layoutsModel.clear();
8282

8383
const seen = new Set();
8484
let idx = 0;
@@ -87,7 +87,7 @@ Item {
8787
if (seen.has(p))
8888
continue;
8989
seen.add(p);
90-
_layoutsModel.append({
90+
layoutsModel.append({
9191
layoutIndex: idx,
9292
token: p,
9393
label: _pretty(p)
@@ -97,19 +97,19 @@ Item {
9797
}
9898

9999
function _rebuildVisible() {
100-
_visibleModel.clear();
100+
visibleModel.clear();
101101

102102
let arr = [];
103-
for (let i = 0; i < _layoutsModel.count; i++)
104-
arr.push(_layoutsModel.get(i));
103+
for (let i = 0; i < layoutsModel.count; i++)
104+
arr.push(layoutsModel.get(i));
105105

106106
arr = arr.filter(i => i.layoutIndex !== activeIndex);
107-
arr.forEach(i => _visibleModel.append(i));
107+
arr.forEach(i => visibleModel.append(i));
108108

109109
if (!GlobalConfig.utilities.toasts.kbLimit)
110110
return;
111111

112-
if (_layoutsModel.count > 4) {
112+
if (layoutsModel.count > 4) {
113113
Toaster.toast(qsTr("Keyboard layout limit"), qsTr("XKB supports only 4 layouts at a time"), "warning");
114114
}
115115
}
@@ -124,26 +124,26 @@ Item {
124124
visible: false
125125

126126
ListModel {
127-
id: _visibleModel
127+
id: visibleModel
128128
}
129129

130130
ListModel {
131-
id: _layoutsModel
131+
id: layoutsModel
132132
}
133133

134134
Process {
135-
id: _xkbXmlBase
135+
id: xkbXmlBase
136136

137137
command: ["xmllint", "--xpath", "//layout/configItem[name and description]", "/usr/share/X11/xkb/rules/base.xml"]
138138
stdout: StdioCollector {
139139
onStreamFinished: model._buildXmlMap(text)
140140
}
141-
onRunningChanged: if (!running && (typeof _xkbXmlBase.exitCode !== "undefined") && _xkbXmlBase.exitCode !== 0) // qmllint disable missing-property
142-
_xkbXmlEvdev.running = true
141+
onRunningChanged: if (!running && (typeof xkbXmlBase.exitCode !== "undefined") && xkbXmlBase.exitCode !== 0) // qmllint disable missing-property
142+
xkbXmlEvdev.running = true
143143
}
144144

145145
Process {
146-
id: _xkbXmlEvdev
146+
id: xkbXmlEvdev
147147

148148
command: ["xmllint", "--xpath", "//layout/configItem[name and description]", "/usr/share/X11/xkb/rules/evdev.xml"]
149149
stdout: StdioCollector {
@@ -152,7 +152,7 @@ Item {
152152
}
153153

154154
Process {
155-
id: _getKbLayoutOpt
155+
id: getKbLayoutOpt
156156

157157
command: ["hyprctl", "-j", "getoption", "input:kb_layout"]
158158
stdout: StdioCollector {
@@ -162,17 +162,17 @@ Item {
162162
const raw = (j?.str || j?.value || "").toString().trim();
163163
if (raw.length) {
164164
model._setLayouts(raw);
165-
_fetchActiveLayouts.running = true;
165+
fetchActiveLayouts.running = true;
166166
return;
167167
}
168168
} catch (e) {}
169-
_fetchLayoutsFromDevices.running = true;
169+
fetchLayoutsFromDevices.running = true;
170170
}
171171
}
172172
}
173173

174174
Process {
175-
id: _fetchLayoutsFromDevices
175+
id: fetchLayoutsFromDevices
176176

177177
command: ["hyprctl", "-j", "devices"]
178178
stdout: StdioCollector {
@@ -184,13 +184,13 @@ Item {
184184
if (raw.length)
185185
model._setLayouts(raw);
186186
} catch (e) {}
187-
_fetchActiveLayouts.running = true;
187+
fetchActiveLayouts.running = true;
188188
}
189189
}
190190
}
191191

192192
Process {
193-
id: _fetchActiveLayouts
193+
id: fetchActiveLayouts
194194

195195
command: ["hyprctl", "-j", "devices"]
196196
stdout: StdioCollector {
@@ -201,7 +201,7 @@ Item {
201201
const idx = kb?.active_layout_index ?? -1;
202202

203203
model.activeIndex = idx >= 0 ? idx : -1;
204-
model.activeLabel = (idx >= 0 && idx < _layoutsModel.count) ? _layoutsModel.get(idx).label : "";
204+
model.activeLabel = (idx >= 0 && idx < layoutsModel.count) ? layoutsModel.get(idx).label : "";
205205
} catch (e) {
206206
model.activeIndex = -1;
207207
model.activeLabel = "";
@@ -213,9 +213,9 @@ Item {
213213
}
214214

215215
Process {
216-
id: _switchProc
216+
id: switchProc
217217

218218
onRunningChanged: if (!running)
219-
_fetchActiveLayouts.running = true
219+
fetchActiveLayouts.running = true
220220
}
221221
}

plugin/src/Caelestia/Blobs/blobshape.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@ static float cornerFillFactor(float sd, float smoothFactor) {
3939
// squaring would only crease the interior). C0-continuous across sd = 0 — unlike the
4040
// old `if (sd >= 0)` branch, which snapped the radius full<->square (factor 1<->0) on
4141
// sub-pixel motion as a corner crossed the edge, flickering the fill bridge in/out.
42-
const float outside = cpuSmoothstep(0.0f, smoothFactor, sd); // 0 at edge, ->1 far outside
43-
const float inside = cpuSmoothstep(0.0f, -smoothFactor, sd); // 0 at edge, ->1 deep inside
42+
const float outside = cpuSmoothstep(0.0f, smoothFactor, sd); // 0 at edge, ->1 far outside
43+
const float inside = cpuSmoothstep(0.0f, -smoothFactor, sd); // 0 at edge, ->1 deep inside
4444
return std::max(outside, inside);
4545
}
4646

services/NetworkUsage.qml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ Singleton {
2020
readonly property real uploadTotal: _uploadTotal
2121

2222
// History buffers for sparkline
23-
readonly property CircularBuffer downloadBuffer: _downloadBuffer
24-
readonly property CircularBuffer uploadBuffer: _uploadBuffer
23+
readonly property alias downloadBuffer: downloadHistory
24+
readonly property alias uploadBuffer: uploadHistory
2525
readonly property int historyLength: 30
2626

2727
// Private properties
@@ -137,13 +137,13 @@ Singleton {
137137
}
138138

139139
CircularBuffer {
140-
id: _downloadBuffer
140+
id: downloadHistory
141141

142142
capacity: root.historyLength + 1
143143
}
144144

145145
CircularBuffer {
146-
id: _uploadBuffer
146+
id: uploadHistory
147147

148148
capacity: root.historyLength + 1
149149
}
@@ -200,10 +200,10 @@ Singleton {
200200
root._uploadSpeed = txDelta / timeDelta;
201201

202202
if (root._downloadSpeed >= 0 && isFinite(root._downloadSpeed))
203-
_downloadBuffer.push(root._downloadSpeed);
203+
downloadHistory.push(root._downloadSpeed);
204204

205205
if (root._uploadSpeed >= 0 && isFinite(root._uploadSpeed))
206-
_uploadBuffer.push(root._uploadSpeed);
206+
uploadHistory.push(root._uploadSpeed);
207207
}
208208

209209
// Calculate totals with overflow handling

0 commit comments

Comments
 (0)