mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-11 21:04:07 -07:00
Lint.
Took 3 minutes
This commit is contained in:
parent
c763e8e994
commit
e38b228ae4
1 changed files with 24 additions and 14 deletions
|
|
@ -103,14 +103,18 @@ QVariant DeckListModel::data(const QModelIndex &index, int role) const
|
||||||
case Qt::DisplayRole:
|
case Qt::DisplayRole:
|
||||||
case Qt::EditRole:
|
case Qt::EditRole:
|
||||||
switch (index.column()) {
|
switch (index.column()) {
|
||||||
case 0: return group->recursiveCount(true);
|
case 0:
|
||||||
case 1: return (role == Qt::DisplayRole
|
return group->recursiveCount(true);
|
||||||
? group->getVisibleName()
|
case 1:
|
||||||
: group->getName());
|
return (role == Qt::DisplayRole ? group->getVisibleName() : group->getName());
|
||||||
case 2: return group->getCardSetShortName();
|
case 2:
|
||||||
case 3: return group->getCardCollectorNumber();
|
return group->getCardSetShortName();
|
||||||
case 4: return group->getCardProviderId();
|
case 3:
|
||||||
default: return {};
|
return group->getCardCollectorNumber();
|
||||||
|
case 4:
|
||||||
|
return group->getCardProviderId();
|
||||||
|
default:
|
||||||
|
return {};
|
||||||
}
|
}
|
||||||
|
|
||||||
case DeckRoles::IsCardRole:
|
case DeckRoles::IsCardRole:
|
||||||
|
|
@ -133,12 +137,18 @@ QVariant DeckListModel::data(const QModelIndex &index, int role) const
|
||||||
case Qt::DisplayRole:
|
case Qt::DisplayRole:
|
||||||
case Qt::EditRole:
|
case Qt::EditRole:
|
||||||
switch (index.column()) {
|
switch (index.column()) {
|
||||||
case 0: return card->getNumber();
|
case 0:
|
||||||
case 1: return card->getName();
|
return card->getNumber();
|
||||||
case 2: return card->getCardSetShortName();
|
case 1:
|
||||||
case 3: return card->getCardCollectorNumber();
|
return card->getName();
|
||||||
case 4: return card->getCardProviderId();
|
case 2:
|
||||||
default: return {};
|
return card->getCardSetShortName();
|
||||||
|
case 3:
|
||||||
|
return card->getCardCollectorNumber();
|
||||||
|
case 4:
|
||||||
|
return card->getCardProviderId();
|
||||||
|
default:
|
||||||
|
return {};
|
||||||
}
|
}
|
||||||
|
|
||||||
case DeckRoles::IsCardRole:
|
case DeckRoles::IsCardRole:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue