Minor fix for country

This commit is contained in:
Klaus Basan
2016-05-29 19:30:37 +02:00
parent 875b311ede
commit 2281b2f030

View File

@@ -126,9 +126,9 @@ namespace BlackMisc
this->setName(variant.toQString()); this->setName(variant.toQString());
break; break;
default: default:
return (IDatastoreObjectWithStringKey::canHandleIndex(index)) ? IDatastoreObjectWithStringKey::canHandleIndex(index) ?
IDatastoreObjectWithStringKey::setPropertyByIndex(index, variant) : IDatastoreObjectWithStringKey::setPropertyByIndex(index, variant) :
CValueObject::setPropertyByIndex(index, variant); CValueObject::setPropertyByIndex(index, variant);
break; break;
} }
} }
@@ -157,8 +157,8 @@ namespace BlackMisc
// when using relationship, this can be null // when using relationship, this can be null
return CCountry(); return CCountry();
} }
QString iso(json.value(prefix + "id").toString()); const QString iso(json.value(prefix + "id").toString());
QString name(json.value(prefix + "country").toString()); const QString name(json.value(prefix + "country").toString());
CCountry country(iso, name); CCountry country(iso, name);
country.setKeyAndTimestampFromDatabaseJson(json, prefix); country.setKeyAndTimestampFromDatabaseJson(json, prefix);
return country; return country;