VirtualBox

Changeset 73657 in vbox for trunk/src/VBox/Frontends


Ignore:
Timestamp:
Aug 14, 2018 1:20:19 PM (6 years ago)
Author:
vboxsync
Message:

FE/Qt: bugref:9152: Export Appliance wizard: Adjust JSON parser again to handle item arrays with complex (object) types, by taking key/value pairs instead of value only (s.a. r124259).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/exportappliance/UIWizardExportAppPageBasic3.cpp

    r73615 r73657  
    224224        if (value.isString())
    225225            fieldValueStringList << fieldValueArray[i].toString();
    226         /* If value is of object type, we just take object values only: */
     226        /* If value is of object type, we take object "key : value" pairs: */
    227227        else if (value.isObject())
    228228        {
    229229            const QJsonObject valueObject = value.toObject();
    230230            foreach (const QString &strKey, valueObject.keys())
    231                 fieldValueStringList << valueObject.value(strKey).toString();
     231                fieldValueStringList << QString("%1 : %2")
     232                                            .arg(strKey)
     233                                            .arg(valueObject.value(strKey).toString());
    232234        }
    233235    }
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette