Skip to content

Commit 2049d2d

Browse files
committed
fix: format
1 parent c1e2bf8 commit 2049d2d

3 files changed

Lines changed: 24 additions & 12 deletions

File tree

‎src/server/src/qml/action-panel-model.cpp‎

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -178,14 +178,18 @@ int ActionPanelModel::nextSelectableIndex(int from, int direction) const {
178178
if (count == 0) return from;
179179

180180
int idx = from + direction;
181-
if (idx < 0) idx = count - 1;
182-
else if (idx >= count) idx = 0;
181+
if (idx < 0)
182+
idx = count - 1;
183+
else if (idx >= count)
184+
idx = 0;
183185

184186
while (idx != from) {
185187
if (m_flat[idx].kind == FlatItem::ActionItem) return idx;
186188
idx += direction;
187-
if (idx < 0) idx = count - 1;
188-
else if (idx >= count) idx = 0;
189+
if (idx < 0)
190+
idx = count - 1;
191+
else if (idx >= count)
192+
idx = 0;
189193
}
190194

191195
return from;

‎src/server/src/qml/command-list-model.cpp‎

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -99,14 +99,18 @@ int CommandListModel::nextSelectableIndex(int from, int direction) const {
9999
if (count == 0) return from;
100100

101101
int idx = from + direction;
102-
if (idx < 0) idx = count - 1;
103-
else if (idx >= count) idx = 0;
102+
if (idx < 0)
103+
idx = count - 1;
104+
else if (idx >= count)
105+
idx = 0;
104106

105107
while (idx != from) {
106108
if (m_flat[idx].kind != FlatItem::SectionHeader) return idx;
107109
idx += direction;
108-
if (idx < 0) idx = count - 1;
109-
else if (idx >= count) idx = 0;
110+
if (idx < 0)
111+
idx = count - 1;
112+
else if (idx >= count)
113+
idx = 0;
110114
}
111115

112116
return from;

‎src/server/src/qml/root-search-model.cpp‎

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -489,14 +489,18 @@ int RootSearchModel::nextSelectableIndex(int from, int direction) const {
489489
if (count == 0) return from;
490490

491491
int idx = from + direction;
492-
if (idx < 0) idx = count - 1;
493-
else if (idx >= count) idx = 0;
492+
if (idx < 0)
493+
idx = count - 1;
494+
else if (idx >= count)
495+
idx = 0;
494496

495497
while (idx != from) {
496498
if (m_flat[idx].kind != FlatItem::SectionHeader) return idx;
497499
idx += direction;
498-
if (idx < 0) idx = count - 1;
499-
else if (idx >= count) idx = 0;
500+
if (idx < 0)
501+
idx = count - 1;
502+
else if (idx >= count)
503+
idx = 0;
500504
}
501505

502506
return from;

0 commit comments

Comments
 (0)