From 95f02ac0a10230799a68d70a13bcbe010bbad3ed Mon Sep 17 00:00:00 2001 From: BruebachL <44814898+BruebachL@users.noreply.github.com> Date: Fri, 9 Oct 2026 06:02:47 +0200 Subject: [PATCH] [CardDB] Drop the rebalanced-cards setting entirely (#7457) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * [CardDB] Drop rebalanced-card filtering from the v4 parser Rebalanced cards no longer exist, so the includeRebalancedCards preference has no data to filter. Always keep printings marked isRebalanced and remove the now-unused ICardPreferenceProvider plumbing from CockatriceXml4Parser and CardDatabaseLoader. The setting itself (CardsDisplaySettings, Manage Sets checkbox, Oracle attribute mapping) is removed in a follow-up. * [CardDB] Drop the rebalanced-cards setting entirely Rebalanced Alchemy cards no longer exist, so remove the includeRebalancedCards preference surface: the CardsDisplaySettings getter/setter/signal, the ICardPreferenceProvider and ICardsDisplaySettingsProvider methods, the Manage Sets checkbox, the legacy settings migration mapping, the isRebalanced attribute mapping in the Oracle importer, and the isRebalanced attribute in the v4 schema. Builds on #7448, which already stopped the v4 parser from filtering on the preference. * [CardDB] Drop the unused isOnlineOnly printing property The Arena-card detection switched from isOnlineOnly to isRebalanced in #5778, so nothing has read this printing property since; it only round-trips from the Oracle importer into cards.xml. Remove the importer mapping, the benchmark fixture field and the v4 schema attribute so regenerated databases stop carrying it. --------- Co-authored-by: Lukas Brübach --- .../settings_card_preference_provider.h | 5 ----- .../widgets/dialogs/dlg_manage_sets.cpp | 17 ++--------------- .../widgets/dialogs/dlg_manage_sets.h | 2 -- doc/carddatabase_v4/cards.xsd | 2 -- .../card/database/card_database.cpp | 2 +- .../card/database/card_database_loader.cpp | 3 +-- .../card/database/card_database_loader.h | 3 --- .../card/database/parser/cockatrice_xml_4.cpp | 18 +++--------------- .../card/database/parser/cockatrice_xml_4.h | 8 +------- .../interface_card_preference_provider.h | 1 - ...interface_cards_display_settings_provider.h | 1 - .../interfaces/noop_card_preference_provider.h | 5 ----- .../settings/cards_display_settings.cpp | 14 -------------- .../settings/cards_display_settings.h | 3 --- .../settings/settings_migration.cpp | 1 - oracle/src/oracleimporter.cpp | 16 ++++++---------- tests/carddatabase/carddatabase_test.cpp | 5 ++--- .../oracle/oracle_importer_benchmark_test.cpp | 4 +--- tests/settings/settings_migration_test.cpp | 2 -- 19 files changed, 17 insertions(+), 95 deletions(-) diff --git a/cockatrice/src/database/interface/settings_card_preference_provider.h b/cockatrice/src/database/interface/settings_card_preference_provider.h index 64502e3a7..1feb2006b 100644 --- a/cockatrice/src/database/interface/settings_card_preference_provider.h +++ b/cockatrice/src/database/interface/settings_card_preference_provider.h @@ -13,11 +13,6 @@ public: { return SettingsCache::instance().cardOverrides().getCardPreferenceOverride(cardName); } - - [[nodiscard]] bool getIncludeRebalancedCards() const override - { - return SettingsCache::instance().cardsDisplay().getIncludeRebalancedCards(); - } }; #endif // COCKATRICE_SETTINGS_CARD_PREFERENCE_PROVIDER_H diff --git a/cockatrice/src/interface/widgets/dialogs/dlg_manage_sets.cpp b/cockatrice/src/interface/widgets/dialogs/dlg_manage_sets.cpp index b3da6d19c..dbfe38e26 100644 --- a/cockatrice/src/interface/widgets/dialogs/dlg_manage_sets.cpp +++ b/cockatrice/src/interface/widgets/dialogs/dlg_manage_sets.cpp @@ -178,12 +178,6 @@ WndSets::WndSets(QWidget *parent) : QMainWindow(parent) sortWarning->setLayout(sortWarningLayout); sortWarning->setVisible(false); - includeRebalancedCards = SettingsCache::instance().cardsDisplay().getIncludeRebalancedCards(); - QCheckBox *includeRebalancedCardsCheckBox = - new QCheckBox(tr("Include cards rebalanced for Alchemy [requires restart]")); - includeRebalancedCardsCheckBox->setChecked(includeRebalancedCards); - connect(includeRebalancedCardsCheckBox, &QAbstractButton::toggled, this, &WndSets::includeRebalancedCardsChanged); - buttonBox = new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel); connect(buttonBox, &QDialogButtonBox::accepted, this, &WndSets::actSave); connect(buttonBox, &QDialogButtonBox::rejected, this, &WndSets::actRestore); @@ -197,9 +191,8 @@ WndSets::WndSets(QWidget *parent) : QMainWindow(parent) mainLayout->addWidget(enableSomeButton, 2, 1); mainLayout->addWidget(disableSomeButton, 2, 2); mainLayout->addWidget(sortWarning, 3, 1, 1, 2); - mainLayout->addWidget(includeRebalancedCardsCheckBox, 4, 1, 1, 2); - mainLayout->addWidget(hintsGroupBox, 5, 1, 1, 2); - mainLayout->addWidget(buttonBox, 6, 1, 1, 2); + mainLayout->addWidget(hintsGroupBox, 4, 1, 1, 2); + mainLayout->addWidget(buttonBox, 5, 1, 1, 2); mainLayout->setColumnStretch(1, 1); mainLayout->setColumnStretch(2, 1); @@ -270,15 +263,9 @@ void WndSets::resetSort() sortWarning->setVisible(false); } -void WndSets::includeRebalancedCardsChanged(bool _includeRebalancedCards) -{ - includeRebalancedCards = _includeRebalancedCards; -} - void WndSets::actSave() { model->save(CardDatabaseManager::getInstance()); - SettingsCache::instance().cardsDisplay().setIncludeRebalancedCards(includeRebalancedCards); CardPictureLoader::clearPixmapCache(); const auto reloadOk1 = QtConcurrent::run([] { CardDatabaseManager::getInstance()->reloadCardDatabasesAndNotify(); diff --git a/cockatrice/src/interface/widgets/dialogs/dlg_manage_sets.h b/cockatrice/src/interface/widgets/dialogs/dlg_manage_sets.h index d08412c51..67b4c90b1 100644 --- a/cockatrice/src/interface/widgets/dialogs/dlg_manage_sets.h +++ b/cockatrice/src/interface/widgets/dialogs/dlg_manage_sets.h @@ -52,7 +52,6 @@ private: int sortIndex; Qt::SortOrder sortOrder; bool setOrderIsSorted; - bool includeRebalancedCards; enum { NO_SETS_SELECTED, @@ -87,7 +86,6 @@ private slots: void actDisableResetButton(const QString &filterText); void actSort(int index); void actIgnoreWarning(); - void includeRebalancedCardsChanged(bool _includeRebalancedCardsChanged); }; #endif diff --git a/doc/carddatabase_v4/cards.xsd b/doc/carddatabase_v4/cards.xsd index 82aed32ab..df52d6327 100644 --- a/doc/carddatabase_v4/cards.xsd +++ b/doc/carddatabase_v4/cards.xsd @@ -29,8 +29,6 @@ - - diff --git a/libcockatrice_card/libcockatrice/card/database/card_database.cpp b/libcockatrice_card/libcockatrice/card/database/card_database.cpp index f61da204f..fc2c7f18c 100644 --- a/libcockatrice_card/libcockatrice/card/database/card_database.cpp +++ b/libcockatrice_card/libcockatrice/card/database/card_database.cpp @@ -33,7 +33,7 @@ CardDatabase::CardDatabase(QObject *parent, qRegisterMetaType("CardDatabaseData"); // create loader and wire it up - loader = new CardDatabaseLoader(this, this, pathProvider, prefs, setPriorityController); + loader = new CardDatabaseLoader(this, this, pathProvider, setPriorityController); // re-emit loader signals (so other code doesn't need to know about internals) connect(loader, &CardDatabaseLoader::loadingFinished, this, &CardDatabase::cardDatabaseLoadingFinished); connect(loader, &CardDatabaseLoader::loadingFailed, this, &CardDatabase::cardDatabaseLoadingFailed); diff --git a/libcockatrice_card/libcockatrice/card/database/card_database_loader.cpp b/libcockatrice_card/libcockatrice/card/database/card_database_loader.cpp index 0f0b28b2a..812760106 100644 --- a/libcockatrice_card/libcockatrice/card/database/card_database_loader.cpp +++ b/libcockatrice_card/libcockatrice/card/database/card_database_loader.cpp @@ -33,12 +33,11 @@ class ICardSetPriorityController; CardDatabaseLoader::CardDatabaseLoader(QObject *parent, CardDatabase *db, ICardDatabasePathProvider *_pathProvider, - ICardPreferenceProvider *_preferenceProvider, ICardSetPriorityController *_priorityController) : QObject(parent), database(db), pathProvider(_pathProvider), priorityController(_priorityController) { // instantiate available parsers here - availableParsers << new CockatriceXml4Parser(_preferenceProvider, _priorityController); + availableParsers << new CockatriceXml4Parser(_priorityController); availableParsers << new CockatriceXml3Parser(_priorityController); // The load path parses into a snapshot and never emits per-card signals; diff --git a/libcockatrice_card/libcockatrice/card/database/card_database_loader.h b/libcockatrice_card/libcockatrice/card/database/card_database_loader.h index 706e31ab2..5dad152eb 100644 --- a/libcockatrice_card/libcockatrice/card/database/card_database_loader.h +++ b/libcockatrice_card/libcockatrice/card/database/card_database_loader.h @@ -11,7 +11,6 @@ #include class ICardDatabasePathProvider; -class ICardPreferenceProvider; class ICardSetPriorityController; // IWYU pragma: keep @@ -59,12 +58,10 @@ public: * @param parent QObject parent. * @param db Pointer to the CardDatabase to populate (non-owning). * @param pathProvider Provider for card database file paths. - * @param preferenceProvider Optional card preference provider for pinned printings. */ explicit CardDatabaseLoader(QObject *parent, CardDatabase *db, ICardDatabasePathProvider *pathProvider, - ICardPreferenceProvider *preferenceProvider, ICardSetPriorityController *_priorityController); /** @brief Destructor cleans up allocated parsers. */ diff --git a/libcockatrice_card/libcockatrice/card/database/parser/cockatrice_xml_4.cpp b/libcockatrice_card/libcockatrice/card/database/parser/cockatrice_xml_4.cpp index eb1416817..4d975e533 100644 --- a/libcockatrice_card/libcockatrice/card/database/parser/cockatrice_xml_4.cpp +++ b/libcockatrice_card/libcockatrice/card/database/parser/cockatrice_xml_4.cpp @@ -37,9 +37,8 @@ class ICardSetPriorityController; #define COCKATRICE_XML4_SCHEMALOCATION \ "https://raw.githubusercontent.com/Cockatrice/Cockatrice/master/doc/carddatabase_v4/cards.xsd" -CockatriceXml4Parser::CockatriceXml4Parser(ICardPreferenceProvider *_cardPreferenceProvider, - ICardSetPriorityController *_cardSetPriorityController) - : ICardDatabaseParser(_cardSetPriorityController), cardPreferenceProvider(_cardPreferenceProvider) +CockatriceXml4Parser::CockatriceXml4Parser(ICardSetPriorityController *_cardSetPriorityController) + : ICardDatabaseParser(_cardSetPriorityController) { } @@ -284,7 +283,6 @@ QHash CockatriceXml4Parser::loadCardPropertiesFromXml(QXmlStre void CockatriceXml4Parser::loadCardsFromXml(QXmlStreamReader &xml) { - bool includeRebalancedCards = cardPreferenceProvider->getIncludeRebalancedCards(); while (!xml.atEnd()) { if (xml.readNext() == QXmlStreamReader::EndElement) { break; @@ -386,17 +384,7 @@ void CockatriceXml4Parser::loadCardsFromXml(QXmlStreamReader &xml) printingProps.insert(attrName, attr.value().toString()); } PrintingInfo printingInfo(set, LazyPropertiesHash(printingProps)); - - // This is very much a hack and not the right place to - // put this check, as it requires a reload of Cockatrice - // to be apply. - // - // However, this is also true of the `set->getEnabled()` - // check above (which is currently bugged as well), so - // we'll fix both at the same time. - if (includeRebalancedCards || printingInfo.getProperty("isRebalanced") != "true") { - _sets[setName].append(printingInfo); - } + _sets[setName].append(printingInfo); } // related cards } else if (xmlName == "related" || xmlName == "reverse-related") { diff --git a/libcockatrice_card/libcockatrice/card/database/parser/cockatrice_xml_4.h b/libcockatrice_card/libcockatrice/card/database/parser/cockatrice_xml_4.h index 5ddf672ee..390282796 100644 --- a/libcockatrice_card/libcockatrice/card/database/parser/cockatrice_xml_4.h +++ b/libcockatrice_card/libcockatrice/card/database/parser/cockatrice_xml_4.h @@ -9,7 +9,6 @@ #include #include -class ICardPreferenceProvider; class ICardSetPriorityController; class QXmlStreamReader; @@ -27,7 +26,6 @@ inline Q_LOGGING_CATEGORY(CockatriceXml4Log, "cockatrice_xml.xml_4_parser"); * @note Differences from v3: * - Card properties are stored in blocks as a QHash. * - Sets can include a element. - * - Supports user preferences via ICardPreferenceProvider (e.g., skipping rebalanced cards). * - Related cards support persistent relations and multiple attach types (e.g., transform). * - More robust serialization; easier to extend schema in the future. */ @@ -35,8 +33,7 @@ class CockatriceXml4Parser : public ICardDatabaseParser { Q_OBJECT public: - explicit CockatriceXml4Parser(ICardPreferenceProvider *cardPreferenceProvider, - ICardSetPriorityController *cardSetPriorityController); + explicit CockatriceXml4Parser(ICardSetPriorityController *cardSetPriorityController); ~CockatriceXml4Parser() override = default; /** @@ -71,8 +68,6 @@ public: const QString &sourceVersion = "unknown") override; private: - ICardPreferenceProvider *cardPreferenceProvider; ///< Interface to handle user preferences - /** * @brief Loads a generic block from a element. * @param xml The open QXmlStreamReader positioned at a element. @@ -83,7 +78,6 @@ private: /** * @brief Load all elements from the XML stream. * @param xml The open QXmlStreamReader positioned at the element. - * Honors the user's preference regarding rebalanced cards. */ void loadCardsFromXml(QXmlStreamReader &xml); diff --git a/libcockatrice_interfaces/libcockatrice/interfaces/interface_card_preference_provider.h b/libcockatrice_interfaces/libcockatrice/interfaces/interface_card_preference_provider.h index a6cf941fb..2510919ca 100644 --- a/libcockatrice_interfaces/libcockatrice/interfaces/interface_card_preference_provider.h +++ b/libcockatrice_interfaces/libcockatrice/interfaces/interface_card_preference_provider.h @@ -8,7 +8,6 @@ class ICardPreferenceProvider public: virtual ~ICardPreferenceProvider() = default; [[nodiscard]] virtual QString getCardPreferenceOverride(const QString &cardName) const = 0; - [[nodiscard]] virtual bool getIncludeRebalancedCards() const = 0; }; #endif // COCKATRICE_INTERFACE_CARD_PREFERENCE_PROVIDER_H diff --git a/libcockatrice_interfaces/libcockatrice/interfaces/interface_cards_display_settings_provider.h b/libcockatrice_interfaces/libcockatrice/interfaces/interface_cards_display_settings_provider.h index 2821fb96e..a5ab4fc37 100644 --- a/libcockatrice_interfaces/libcockatrice/interfaces/interface_cards_display_settings_provider.h +++ b/libcockatrice_interfaces/libcockatrice/interfaces/interface_cards_display_settings_provider.h @@ -14,7 +14,6 @@ public: [[nodiscard]] virtual bool getBumpSetsWithCardsInDeckToTop() const = 0; [[nodiscard]] virtual int getPrintingSelectorSortOrder() const = 0; [[nodiscard]] virtual int getPrintingSelectorCardSize() const = 0; - [[nodiscard]] virtual bool getIncludeRebalancedCards() const = 0; [[nodiscard]] virtual bool getPrintingSelectorNavigationButtonsVisible() const = 0; [[nodiscard]] virtual bool getTapAnimation() const = 0; [[nodiscard]] virtual bool getArrowDrawAnimation() const = 0; diff --git a/libcockatrice_interfaces/libcockatrice/interfaces/noop_card_preference_provider.h b/libcockatrice_interfaces/libcockatrice/interfaces/noop_card_preference_provider.h index 3781f4b63..f846d51e8 100644 --- a/libcockatrice_interfaces/libcockatrice/interfaces/noop_card_preference_provider.h +++ b/libcockatrice_interfaces/libcockatrice/interfaces/noop_card_preference_provider.h @@ -9,11 +9,6 @@ public: { return {}; } - - [[nodiscard]] bool getIncludeRebalancedCards() const override - { - return true; - } }; #endif // COCKATRICE_NOOP_CARD_PREFERENCE_PROVIDER_H diff --git a/libcockatrice_settings/libcockatrice/settings/cards_display_settings.cpp b/libcockatrice_settings/libcockatrice/settings/cards_display_settings.cpp index 1addef70f..f047973f0 100644 --- a/libcockatrice_settings/libcockatrice/settings/cards_display_settings.cpp +++ b/libcockatrice_settings/libcockatrice/settings/cards_display_settings.cpp @@ -43,11 +43,6 @@ int CardsDisplaySettings::getPrintingSelectorCardSize() const return getValue("printingSelector", "cards", "cardSize", 100).toInt(); } -bool CardsDisplaySettings::getIncludeRebalancedCards() const -{ - return getValue("includerebalancedcards", QString(), QString(), true).toBool(); -} - bool CardsDisplaySettings::getPrintingSelectorNavigationButtonsVisible() const { return getValue("navigationButtonsVisible", "cards", "printingSelector", true).toBool(); @@ -167,15 +162,6 @@ void CardsDisplaySettings::setPrintingSelectorCardSize(int _printingSelectorCard emit printingSelectorCardSizeChanged(); } -void CardsDisplaySettings::setIncludeRebalancedCards(bool _includeRebalancedCards) -{ - if (_includeRebalancedCards == getIncludeRebalancedCards()) { - return; - } - setValue(_includeRebalancedCards, "includerebalancedcards"); - emit includeRebalancedCardsChanged(_includeRebalancedCards); -} - void CardsDisplaySettings::setPrintingSelectorNavigationButtonsVisible(bool _navigationButtonsVisible) { setValue(_navigationButtonsVisible, "navigationButtonsVisible", "cards", "printingSelector"); diff --git a/libcockatrice_settings/libcockatrice/settings/cards_display_settings.h b/libcockatrice_settings/libcockatrice/settings/cards_display_settings.h index 4e6b92d27..961550d3c 100644 --- a/libcockatrice_settings/libcockatrice/settings/cards_display_settings.h +++ b/libcockatrice_settings/libcockatrice/settings/cards_display_settings.h @@ -21,7 +21,6 @@ public: [[nodiscard]] bool getBumpSetsWithCardsInDeckToTop() const override; [[nodiscard]] int getPrintingSelectorSortOrder() const override; [[nodiscard]] int getPrintingSelectorCardSize() const override; - [[nodiscard]] bool getIncludeRebalancedCards() const override; [[nodiscard]] bool getPrintingSelectorNavigationButtonsVisible() const override; [[nodiscard]] bool getTapAnimation() const override; [[nodiscard]] bool getArrowDrawAnimation() const override; @@ -45,7 +44,6 @@ public: void setBumpSetsWithCardsInDeckToTop(bool _bumpSetsWithCardsInDeckToTop); void setPrintingSelectorSortOrder(int _printingSelectorSortOrder); void setPrintingSelectorCardSize(int _printingSelectorCardSize); - void setIncludeRebalancedCards(bool _includeRebalancedCards); void setPrintingSelectorNavigationButtonsVisible(bool _navigationButtonsVisible); void setTapAnimation(bool _tapAnimation); void setArrowDrawAnimation(bool _arrowDrawAnimation); @@ -70,7 +68,6 @@ signals: void bumpSetsWithCardsInDeckToTopChanged(); void printingSelectorSortOrderChanged(); void printingSelectorCardSizeChanged(); - void includeRebalancedCardsChanged(bool _includeRebalancedCards); void printingSelectorNavigationButtonsVisibleChanged(); void visualDeckStorageCardSizeChanged(); void visualDatabaseDisplayCardSizeChanged(); diff --git a/libcockatrice_settings/libcockatrice/settings/settings_migration.cpp b/libcockatrice_settings/libcockatrice/settings/settings_migration.cpp index d8b637210..c343ef801 100644 --- a/libcockatrice_settings/libcockatrice/settings/settings_migration.cpp +++ b/libcockatrice_settings/libcockatrice/settings/settings_migration.cpp @@ -259,7 +259,6 @@ static void migrateCardsDisplaySettings(const QString &settingsPath, QSettings & {"cards/roundcardcorners", "cards/roundCardCorners"}, {"cards/overrideallcardartwithpersonalpreference", "cards/overrideAllCardArtWithPersonalPreference"}, {"cards/bumpsetswithcardsindecktotop", "cards/bumpSetsWithCardsInDeckToTop"}, - {"cards/includerebalancedcards", "cards/includerebalancedcards"}, {"cards/tapanimation", "cards/tapAnimation"}, {"cards/autorotatesidewayslayoutcards", "cards/autoRotateSidewaysLayoutCards"}, {"cards/scaleCards", "cards/scaleCards"}, diff --git a/oracle/src/oracleimporter.cpp b/oracle/src/oracleimporter.cpp index b30565ed0..3382e36d6 100644 --- a/oracle/src/oracleimporter.cpp +++ b/oracle/src/oracleimporter.cpp @@ -4,7 +4,6 @@ #include "libcockatrice/card/format/format_legality_rules.h" #include "libcockatrice/card/lazy_properties_hash.h" #include "libcockatrice/card/relation/card_relation_type.h" -#include "libcockatrice/interfaces/noop_card_preference_provider.h" #include "libcockatrice/interfaces/noop_card_set_priority_controller.h" #include "parsehelpers.h" @@ -302,9 +301,9 @@ CardInfoPtr OracleImporter::addCard(QString name, static QString getJsonString(const QJsonObject &obj, const QString &key) { - // QVariant coerces numbers and booleans to text, while QJsonValue::toString() - // returns a null string for them — some MTGJSON fields (manaValue, - // convertedManaCost, isOnlineOnly, isRebalanced) carry those types. + // QVariant coerces numbers to text, while QJsonValue::toString() returns a + // null string for them — MTGJSON fields like manaValue and convertedManaCost + // carry those types. return obj.value(key).toVariant().toString(); } @@ -413,11 +412,8 @@ int OracleImporter::importCardsFromSet(const CardSetPtr ¤tSet, const QJson }; // mtgjson name => xml name - static const QMap setInfoProperties{{"number", "num"}, - {"rarity", "rarity"}, - {"isOnlineOnly", "isOnlineOnly"}, - {"isRebalanced", "isRebalanced"}, - {"artist", "artist"}}; + static const QMap setInfoProperties{ + {"number", "num"}, {"rarity", "rarity"}, {"artist", "artist"}}; // mtgjson name => xml name static const QMap identifierProperties{{"multiverseId", "muid"}, {"scryfallId", "uuid"}}; @@ -852,7 +848,7 @@ int OracleImporter::startImport() bool OracleImporter::saveToFile(const QString &fileName, const QString &sourceUrl, const QString &sourceVersion) { - CockatriceXml4Parser parser(new NoopCardPreferenceProvider(), new NoopCardSetPriorityController()); + CockatriceXml4Parser parser(new NoopCardSetPriorityController()); return parser.saveToFile(createDefaultMagicFormats(), sets, cards, fileName, sourceUrl, sourceVersion); } diff --git a/tests/carddatabase/carddatabase_test.cpp b/tests/carddatabase/carddatabase_test.cpp index 0bfd8a5dd..3f1284d0a 100644 --- a/tests/carddatabase/carddatabase_test.cpp +++ b/tests/carddatabase/carddatabase_test.cpp @@ -77,12 +77,11 @@ TEST(CardDatabaseTest, Xml4LocalizedDataRoundTrip) QTemporaryDir tempDir; const QString fileName = tempDir.filePath("cards.xml"); - NoopCardPreferenceProvider prefProvider; - CockatriceXml4Parser writer(&prefProvider, &controller); + CockatriceXml4Parser writer(&controller); ASSERT_TRUE(writer.saveToFile({}, sets, cards, fileName)); CardDatabaseData data; - CockatriceXml4Parser parser(&prefProvider, &controller); + CockatriceXml4Parser parser(&controller); QFile file(fileName); ASSERT_TRUE(file.open(QIODevice::ReadOnly)); parser.parseFileInto(file, data); diff --git a/tests/oracle/oracle_importer_benchmark_test.cpp b/tests/oracle/oracle_importer_benchmark_test.cpp index 77b44af71..c2a4aaf4b 100644 --- a/tests/oracle/oracle_importer_benchmark_test.cpp +++ b/tests/oracle/oracle_importer_benchmark_test.cpp @@ -62,12 +62,10 @@ static QByteArray buildSyntheticData(int numSets, int cardsPerSet) card["colors"] = QJsonArray{"W"}; card["colorIdentity"] = QJsonArray{"W"}; card["types"] = QJsonArray{"Creature"}; - // Real MTGJSON types: floats and booleans, not strings. This + // Real MTGJSON types: floats, not strings. This // exercises the QVariant coercion in the property reader. card["convertedManaCost"] = 1.0; card["manaValue"] = 1.0; - card["isOnlineOnly"] = false; - card["isRebalanced"] = false; QJsonObject legalities; legalities["standard"] = "legal"; diff --git a/tests/settings/settings_migration_test.cpp b/tests/settings/settings_migration_test.cpp index 8994ebca6..440e49b74 100644 --- a/tests/settings/settings_migration_test.cpp +++ b/tests/settings/settings_migration_test.cpp @@ -236,7 +236,6 @@ TEST_F(SettingsMigrationTest, MigratesAllSettingsGroups) g.setValue("cards/roundcardcorners", false); g.setValue("cards/overrideallcardartwithpersonalpreference", true); g.setValue("cards/bumpsetswithcardsindecktotop", false); - g.setValue("cards/includerebalancedcards", false); g.setValue("cards/autorotatesidewayslayoutcards", false); g.setValue("cards/tapanimation", true); g.setValue("cards/scaleCards", false); @@ -395,7 +394,6 @@ TEST_F(SettingsMigrationTest, MigratesAllSettingsGroups) ASSERT_EQ(readFromIni("cards_display.ini", "cards/roundCardCorners"), QVariant(false)); ASSERT_EQ(readFromIni("cards_display.ini", "cards/overrideAllCardArtWithPersonalPreference"), QVariant(true)); ASSERT_EQ(readFromIni("cards_display.ini", "cards/bumpSetsWithCardsInDeckToTop"), QVariant(false)); - ASSERT_EQ(readFromIni("cards_display.ini", "cards/includerebalancedcards"), QVariant(false)); ASSERT_EQ(readFromIni("cards_display.ini", "cards/autoRotateSidewaysLayoutCards"), QVariant(false)); ASSERT_EQ(readFromIni("cards_display.ini", "cards/tapAnimation"), QVariant(true)); ASSERT_EQ(readFromIni("cards_display.ini", "cards/scaleCards"), QVariant(false));