Qt6: .toObject()

This commit is contained in:
tobtoht 2022-05-24 17:24:24 +02:00
parent 80fed34d16
commit d7c4717092
No known key found for this signature in database
GPG key ID: 1CADD27F41F45C3C

View file

@ -156,8 +156,8 @@ void LocalMoneroModel::setPaymentMethods(const QJsonObject &data) {
m_paymentMethods = data;
m_paymentMethodNames.clear();
for (const auto &payment_method : data) {
auto code = payment_method["code"].toString();
auto name = payment_method["name"].toString();
auto code = payment_method.toObject()["code"].toString();
auto name = payment_method.toObject()["name"].toString();
if (!code.isEmpty() && !name.isEmpty()) {
m_paymentMethodNames[code] = name;