[DeckList] refactor: pass DeckList by const ref (#6437)

* [DeckList] refactor: pass DeckList by const ref

* Change getDeckList to return a const ref
This commit is contained in:
RickyRister 2025-12-21 16:19:33 -08:00 committed by GitHub
parent 73a90bdf38
commit a0f977e80c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
12 changed files with 70 additions and 75 deletions

View file

@ -527,9 +527,9 @@ DeckLoader *DeckEditorDeckDockWidget::getDeckLoader()
return deckLoader;
}
DeckList *DeckEditorDeckDockWidget::getDeckList()
const DeckList &DeckEditorDeckDockWidget::getDeckList() const
{
return deckModel->getDeckList();
return *deckModel->getDeckList();
}
/**

View file

@ -61,7 +61,7 @@ public slots:
void syncDisplayWidgetsToModel();
void sortDeckModelToDeckView();
DeckLoader *getDeckLoader();
DeckList *getDeckList();
const DeckList &getDeckList() const;
void actIncrement();
bool swapCard(const QModelIndex &idx);
void actDecrementCard(const ExactCard &card, QString zoneName);