More fixes.

Took 7 minutes
This commit is contained in:
Lukas Brübach 2025-11-15 15:50:43 +01:00
parent 3d371ea70f
commit 1439b983b5
2 changed files with 15 additions and 0 deletions

View file

@ -46,6 +46,19 @@ QList<CardSetPtr> CardPictureToLoad::extractSetsSorted(const ExactCard &card)
return sortedSets;
}
/**
* Finds the PrintingInfo corresponding to the exactCards's card name that belongs to a given set and has the
* exactCards's providerId.
* If the set name is in the CardInfo, but no printings in that set match the card's providerId, then the first
* PrintingInfo for the set is returned.
*
* This method only exists to maintain existing behavior.
* TODO: check if going through all sets is still necessary after the ExactCard refactor.
*
* @param card The card to look in
* @param setName The set's short name
* @return A PrintingInfo, or a default-constructed PrintingInfo if the set name is not in the CardInfo.
*/
static PrintingInfo findPrintingForSet(const ExactCard &card, const QString &setName)
{
SetToPrintingsMap setsToPrintings = card.getInfo().getSets();

View file

@ -69,6 +69,7 @@ public:
* @return True if a next set exists and was selected, false if at the end.
*
* Updates currentSet and repopulates currentSetUrls.
* If we are already at the end of the list, then currentSet is set to empty.
*/
bool nextSet();
@ -77,6 +78,7 @@ public:
* @return True if a next URL exists, false if at the end.
*
* Updates currentUrl.
* If we are already at the end of the list, then currentUrl is set to empty.
*/
bool nextUrl();