[Fix-Warnings] Remove redundant parentheses

This commit is contained in:
Brübach, Lukas 2025-11-29 09:23:11 +01:00
parent 858361e6d3
commit 8ddbdf31f9
75 changed files with 269 additions and 269 deletions

View file

@ -155,7 +155,7 @@ bool CardDatabaseDisplayModel::filterAcceptsRow(int sourceRow, const QModelIndex
{
CardInfoPtr info = static_cast<CardDatabaseModel *>(sourceModel())->getCard(sourceRow);
if (((isToken == ShowTrue) && !info->getIsToken()) || ((isToken == ShowFalse) && info->getIsToken()))
if ((isToken == ShowTrue && !info->getIsToken()) || (isToken == ShowFalse && info->getIsToken()))
return false;
if (filterString != nullptr) {

View file

@ -23,8 +23,9 @@ int SetsModel::rowCount(const QModelIndex &parent) const
QVariant SetsModel::data(const QModelIndex &index, int role) const
{
if (!index.isValid() || (index.column() >= NUM_COLS) || (index.row() >= rowCount()))
if (!index.isValid() || index.column() >= NUM_COLS || index.row() >= rowCount()) {
return QVariant();
}
CardSetPtr set = sets[index.row()];
@ -72,7 +73,7 @@ bool SetsModel::setData(const QModelIndex &index, const QVariant &value, int rol
QVariant SetsModel::headerData(int section, Qt::Orientation orientation, int role) const
{
if ((role != Qt::DisplayRole) || (orientation != Qt::Horizontal))
if (role != Qt::DisplayRole || orientation != Qt::Horizontal)
return QVariant();
switch (section) {
case SortKeyCol:
@ -289,9 +290,9 @@ bool SetsDisplayModel::filterAcceptsRow(int sourceRow, const QModelIndex &source
const auto filter = filterRegExp();
#endif
return (sourceModel()->data(typeIndex).toString().contains(filter) ||
sourceModel()->data(nameIndex).toString().contains(filter) ||
sourceModel()->data(shortNameIndex).toString().contains(filter));
return sourceModel()->data(typeIndex).toString().contains(filter) ||
sourceModel()->data(nameIndex).toString().contains(filter) ||
sourceModel()->data(shortNameIndex).toString().contains(filter);
}
bool SetsDisplayModel::lessThan(const QModelIndex &left, const QModelIndex &right) const