[CardInfo] use QString QHash instead of QVariantHash for properties (#7063)
Some checks failed
Build Desktop / Configure (push) Has been cancelled
Build Docker Image / amd64 & arm64 (push) Has been cancelled
Build Desktop / Debian 13 (push) Has been cancelled
Build Desktop / Debian 12 (push) Has been cancelled
Build Desktop / Fedora 44 (push) Has been cancelled
Build Desktop / Fedora 43 (push) Has been cancelled
Build Desktop / Servatrice_Debian 12 (push) Has been cancelled
Build Desktop / Ubuntu 26.04 (push) Has been cancelled
Build Desktop / Ubuntu 24.04 (push) Has been cancelled
Build Desktop / Arch (push) Has been cancelled
Build Desktop / macOS 14 (push) Has been cancelled
Build Desktop / macOS 15 (push) Has been cancelled
Build Desktop / macOS 13 Intel (push) Has been cancelled
Build Desktop / macOS 15 Debug (push) Has been cancelled
Build Desktop / Windows 10 (push) Has been cancelled

* [CardInfo] use QString QHash instead of QVariantHash for properties

* bump CACHE_VERSION

* cleanups
This commit is contained in:
RickyRister 2026-08-02 20:02:37 -07:00 committed by GitHub
parent b44dcf5951
commit 1ed9823b56
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
11 changed files with 70 additions and 73 deletions

View file

@ -19,7 +19,7 @@ inline Q_LOGGING_CATEGORY(CockatriceXml4Log, "cockatrice_xml.xml_4_parser");
* making the parser more extensible and schema-compliant.
*
* @note Differences from v3:
* - Card properties are stored in <prop> blocks as a QVariantHash.
* - Card properties are stored in <prop> blocks as a QHash<QString, QString>.
* - Sets can include a <priority> element.
* - Supports user preferences via ICardPreferenceProvider (e.g., skipping rebalanced cards).
* - Related cards support persistent relations and multiple attach types (e.g., transform).
@ -70,9 +70,9 @@ private:
/**
* @brief Loads a generic <prop> block from a <card> element.
* @param xml The open QXmlStreamReader positioned at a <prop> element.
* @return A QVariantHash mapping property names to values.
* @return A QHash<QString, QString> mapping property names to values.
*/
QVariantHash loadCardPropertiesFromXml(QXmlStreamReader &xml);
QHash<QString, QString> loadCardPropertiesFromXml(QXmlStreamReader &xml);
/**
* @brief Load all <card> elements from the XML stream.