style: Add braces to all control flow statements (#6887)

* style: Add braces to all control flow statements

  Standardize code style by adding explicit braces to all single-statement
  control flow blocks (if, else, for, while) across the entire codebase.

  Also documents the InsertBraces clang-format option (requires v15+) for
  future automated enforcement.

* InsertBraces-check-enabled
This commit is contained in:
DawnFire42 2026-05-16 13:19:53 -04:00 committed by GitHub
parent 7153f7d4c1
commit aadee34238
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
173 changed files with 2725 additions and 1461 deletions

View file

@ -93,10 +93,11 @@ void TabArchidekt::initializeUi()
colorLayout->addWidget(manaSymbol);
connect(manaSymbol, &ManaSymbolWidget::colorToggled, this, [this](QChar c, bool active) {
if (active)
if (active) {
activeColors.insert(c);
else
} else {
activeColors.remove(c);
}
doSearch();
});
}
@ -298,16 +299,18 @@ void TabArchidekt::setupFilterWidgets()
searchModel->updateSearchResults(text);
QString pattern = ".*" + QRegularExpression::escape(text) + ".*";
proxyModel->setFilterRegularExpression(QRegularExpression(pattern, QRegularExpression::CaseInsensitiveOption));
if (!text.isEmpty())
if (!text.isEmpty()) {
completer->complete();
}
});
connect(commandersField, &QLineEdit::textChanged, this, [=](const QString &text) {
searchModel->updateSearchResults(text);
QString pattern = ".*" + QRegularExpression::escape(text) + ".*";
proxyModel->setFilterRegularExpression(QRegularExpression(pattern, QRegularExpression::CaseInsensitiveOption));
if (!text.isEmpty())
if (!text.isEmpty()) {
completer->complete();
}
});
// Assemble secondary toolbar
@ -492,12 +495,13 @@ QString TabArchidekt::buildSearchUrl()
QString logic = "GTE";
QString selected = minDeckSizeLogicCombo->currentText();
if (selected == "")
if (selected == "") {
logic = "GTE";
else if (selected == "")
} else if (selected == "") {
logic = "LTE";
else
} else {
logic = "";
}
if (!logic.isEmpty()) {
query.addQueryItem("sizeLogic", logic);