chore: formatter & clangd lsp option
C++ / fmt (pull_request) Successful in 5s
C++ / build (pull_request) Failing after 10s
C++ / clang-tidy (pull_request) Failing after 10s
JS/TS / fmt (pull_request) Successful in 7s
JS/TS / lint (pull_request) Successful in 9s
Python / static (pull_request) Successful in 27s
Rust / build (pull_request) Successful in 50s
Python / verify (pull_request) Successful in 1m40s
Rust / fmt (pull_request) Successful in 28s
Rust / clippy (pull_request) Successful in 45s

This commit is contained in:
2026-10-18 15:23:40 +02:00
parent 45aa6c9005
commit 08d42e1f8a
15 changed files with 73 additions and 78 deletions
+11 -11
View File
@@ -187,7 +187,7 @@ void CarouselView::setModel(const QVariantList& m) {
emit modelChanged();
const int newCount = m_model.size();
const int newCount = static_cast<int>(m_model.size());
if (newCount == 0) {
m_currentRealIndex = -1;
@@ -647,7 +647,7 @@ qreal CarouselView::sampleSize(qreal childLoc) const {
}
int CarouselView::realIndexOf(int virtualIndex) const {
const int count = m_model.size();
const int count = static_cast<int>(m_model.size());
if (count == 0) return -1;
@@ -668,7 +668,7 @@ qreal CarouselView::snapTargetX(qreal x) const {
}
void CarouselView::wrapContentIfNeeded() {
const int count = m_model.size();
const int count = static_cast<int>(m_model.size());
if (count == 0) return;
@@ -707,7 +707,7 @@ void CarouselView::wrapContentIfNeeded() {
}
void CarouselView::updateCurrentIndexFromContentX(bool emitPreview) {
const int count = m_model.size();
const int count = static_cast<int>(m_model.size());
if (count == 0) return;
@@ -856,8 +856,8 @@ void CarouselView::positionSlot(const Slot& slot) const {
return rightIndex == n ? m_arrangement.outerSpacing : m_itemSpacing;
};
const auto leftGap = [this, n](int leftIndex) {
return leftIndex == -n ? m_arrangement.outerSpacing : m_itemSpacing;
const auto leftGap = [this, n](int gapIndex) {
return gapIndex == -n ? m_arrangement.outerSpacing : m_itemSpacing;
};
qreal center = 0;
@@ -974,7 +974,7 @@ void CarouselView::releaseAllItems() {
}
void CarouselView::relayout() {
const int count = m_model.size();
const int count = static_cast<int>(m_model.size());
if (count == 0 || width() <= 0 || m_focalWidth <= 0) {
for (Slot& s : m_slots) {
@@ -1038,7 +1038,7 @@ void CarouselView::relayout() {
m_slots.append(Slot{});
slotUsedThisPass.append(false);
freeSlot = m_slots.size() - 1;
freeSlot = static_cast<int>(m_slots.size()) - 1;
}
updateSlotContent(m_slots[freeSlot], v);
@@ -1092,7 +1092,7 @@ void CarouselView::snapToNearest() {
}
void CarouselView::goToIndex(int realIndex) {
const int count = m_model.size();
const int count = static_cast<int>(m_model.size());
if (count == 0) return;
@@ -1126,7 +1126,7 @@ void CarouselView::decrementCurrentIndex() {
}
void CarouselView::centerInstantlyOnReal(int realIndex) {
const int count = m_model.size();
const int count = static_cast<int>(m_model.size());
if (count == 0) return;
@@ -1220,7 +1220,7 @@ qreal CarouselView::sampledVelocity() const {
const VelocitySample& oldest = m_velocitySamples.first();
const VelocitySample& newest = m_velocitySamples.last();
const qreal dt = newest.t - oldest.t;
const qreal dt = static_cast<qreal>(newest.t - oldest.t);
if (dt < 8) return 0;