Changeset 73614 in vbox for trunk/src/VBox/Frontends
- Timestamp:
- Aug 10, 2018 12:15:14 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/wizards/exportappliance/UIWizardExportAppPageBasic3.cpp
r73613 r73614 211 211 AssertMsgReturn(field.isArray(), ("Field '%s' has wrong structure!", strFieldName.toUtf8().constData()), QStringList()); 212 212 const QJsonArray fieldValueArray = field.toArray(); 213 QStringList fieldValueStirngList; 213 QStringList fieldValueStringList; 214 /* Parse array: */ 214 215 for (int i = 0; i < fieldValueArray.count(); ++i) 215 fieldValueStirngList << fieldValueArray[i].toString(); 216 //printf(" Field value: \"%s\"\n", fieldValueStirngList.join(", ").toUtf8().constData()); 217 218 return fieldValueStirngList; 216 { 217 /* Parse current array value: */ 218 const QJsonValue value = fieldValueArray[i]; 219 /* If value is of string type, we just take it: */ 220 if (value.isString()) 221 fieldValueStringList << fieldValueArray[i].toString(); 222 /* If value is of object type, we just take object values only: */ 223 else if (value.isObject()) 224 { 225 const QJsonObject valueObject = value.toObject(); 226 foreach (const QString &strKey, valueObject.keys()) 227 fieldValueStringList << valueObject.value(strKey).toString(); 228 } 229 } 230 //printf(" Field value: \"%s\"\n", fieldValueStringList.join(", ").toUtf8().constData()); 231 232 return fieldValueStringList; 219 233 } 220 234
Note:
See TracChangeset
for help on using the changeset viewer.