[CardInfo] refactor some fields into a UiAttributes struct (#6322)

* refactor CardInfo

* refactor everything else
This commit is contained in:
RickyRister
2025-11-16 17:56:57 +01:00
committed by GitHub
parent 722344967f
commit 9a3104c5ac
12 changed files with 73 additions and 87 deletions
+3 -3
View File
@@ -204,11 +204,11 @@ CardInfoPtr OracleImporter::addCard(QString name,
bool upsideDown = layout == "flip" && side == "back";
// insert the card and its properties
QList<CardRelation *> reverseRelatedCards;
SetToPrintingsMap setsInfo;
setsInfo[printingInfo.getSet()->getShortName()].append(printingInfo);
CardInfoPtr newCard = CardInfo::newInstance(name, text, isToken, properties, relatedCards, reverseRelatedCards,
setsInfo, cipt, landscapeOrientation, tableRow, upsideDown);
CardInfo::UiAttributes attributes = {cipt, landscapeOrientation, tableRow, upsideDown};
CardInfoPtr newCard =
CardInfo::newInstance(name, text, isToken, properties, relatedCards, {}, setsInfo, attributes);
if (name.isEmpty()) {
qDebug() << "warning: an empty card was added to set" << printingInfo.getSet()->getShortName();