mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-19 00:42:14 -07:00
Return cardlists directly.
This commit is contained in:
parent
66065045f0
commit
8af56f5c3d
5 changed files with 17 additions and 17 deletions
|
|
@ -484,9 +484,9 @@ void DeckListModel::setDeckList(DeckLoader *_deck)
|
|||
rebuildTree();
|
||||
}
|
||||
|
||||
QList<CardInfoPtr> *DeckListModel::getCardsAsCardInfoPtrs() const
|
||||
QList<CardInfoPtr> DeckListModel::getCardsAsCardInfoPtrs() const
|
||||
{
|
||||
QList<CardInfoPtr> *cards = new QList<CardInfoPtr>();
|
||||
QList<CardInfoPtr> cards;
|
||||
DeckList *decklist = getDeckList();
|
||||
if (!decklist) {
|
||||
return cards;
|
||||
|
|
@ -507,7 +507,7 @@ QList<CardInfoPtr> *DeckListModel::getCardsAsCardInfoPtrs() const
|
|||
CardInfoPtr info = CardDatabaseManager::getInstance()->getCardByNameAndProviderId(
|
||||
currentCard->getName(), currentCard->getCardProviderId());
|
||||
if (info) {
|
||||
cards->append(info);
|
||||
cards.append(info);
|
||||
} else {
|
||||
qDebug() << "Card not found in database!";
|
||||
}
|
||||
|
|
@ -517,9 +517,9 @@ QList<CardInfoPtr> *DeckListModel::getCardsAsCardInfoPtrs() const
|
|||
return cards;
|
||||
}
|
||||
|
||||
QList<CardInfoPtr> *DeckListModel::getCardsAsCardInfoPtrsForZone(QString zoneName) const
|
||||
QList<CardInfoPtr> DeckListModel::getCardsAsCardInfoPtrsForZone(QString zoneName) const
|
||||
{
|
||||
QList<CardInfoPtr> *cards = new QList<CardInfoPtr>();
|
||||
QList<CardInfoPtr> cards;
|
||||
DeckList *decklist = getDeckList();
|
||||
if (!decklist) {
|
||||
return cards;
|
||||
|
|
@ -541,7 +541,7 @@ QList<CardInfoPtr> *DeckListModel::getCardsAsCardInfoPtrsForZone(QString zoneNam
|
|||
CardInfoPtr info = CardDatabaseManager::getInstance()->getCardByNameAndProviderId(
|
||||
currentCard->getName(), currentCard->getCardProviderId());
|
||||
if (info) {
|
||||
cards->append(info);
|
||||
cards.append(info);
|
||||
} else {
|
||||
qDebug() << "Card not found in database!";
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue