mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-09-29 17:32:17 -07:00
[CardInfo] use QString QHash instead of QVariantHash for properties
This commit is contained in:
parent
be6a783c12
commit
8aebc430c9
10 changed files with 67 additions and 69 deletions
|
|
@ -27,14 +27,14 @@ void PrintingInfo::ensurePropertiesLoaded() const
|
|||
void PrintingInfo::setProperty(const QString &_name, const QString &_value)
|
||||
{
|
||||
ensurePropertiesLoaded();
|
||||
if (propertiesCache.value(_name).toString() == _value) {
|
||||
if (propertiesCache.value(_name) == _value) {
|
||||
return;
|
||||
}
|
||||
propertiesCache.insert(_name, _value);
|
||||
setProperties(propertiesCache);
|
||||
}
|
||||
|
||||
void PrintingInfo::setProperties(const QVariantHash &_props)
|
||||
void PrintingInfo::setProperties(const QHash<QString, QString> &_props)
|
||||
{
|
||||
ensurePropertiesLoaded();
|
||||
propertiesCache = _props;
|
||||
|
|
@ -48,10 +48,10 @@ void PrintingInfo::setProperties(const QVariantHash &_props)
|
|||
*/
|
||||
QString PrintingInfo::getUuid() const
|
||||
{
|
||||
return getPropertiesHash().value("uuid").toString();
|
||||
return getPropertiesHash().value("uuid");
|
||||
}
|
||||
|
||||
QString PrintingInfo::getFlavorName() const
|
||||
{
|
||||
return getPropertiesHash().value("flavorName").toString();
|
||||
return getPropertiesHash().value("flavorName");
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue