Changeset 75227 in vbox
- Timestamp:
- Nov 2, 2018 2:48:47 PM (6 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/wizards/exportappliance
- Files:
-
- 6 edited
-
UIWizardExportAppPageBasic2.cpp (modified) (8 diffs)
-
UIWizardExportAppPageBasic2.h (modified) (5 diffs)
-
UIWizardExportAppPageBasic3.cpp (modified) (4 diffs)
-
UIWizardExportAppPageBasic3.h (modified) (2 diffs)
-
UIWizardExportAppPageExpert.cpp (modified) (6 diffs)
-
UIWizardExportAppPageExpert.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/wizards/exportappliance/UIWizardExportAppPageBasic2.cpp
r75226 r75227 26 26 # include <QGridLayout> 27 27 # include <QHeaderView> 28 # include <QJsonArray> 29 # include <QJsonDocument> 30 # include <QJsonObject> 31 # include <QJsonValue> 28 32 # include <QLabel> 29 33 # include <QLineEdit> … … 46 50 47 51 /* COM includes: */ 52 # include "CCloudClient.h" 48 53 # include "CCloudProvider.h" 49 54 … … 288 293 } 289 294 295 void UIWizardExportAppPage2::populateCloudClientParameters() 296 { 297 /* Forget current parameters: */ 298 m_cloudClientParameters.clear(); 299 300 /* Return if no profile chosen: */ 301 if (m_comCloudProfile.isNull()) 302 return; 303 304 /* Create Cloud Client: */ 305 CCloudClient comCloudClient = m_comCloudProfile.CreateCloudClient(); 306 /* Show error message if necessary: */ 307 if (!m_comCloudProfile.isOk()) 308 msgCenter().cannotCreateCloudClient(m_comCloudProfile); 309 else 310 { 311 /* Read Cloud Client parameters for Export VM operation: */ 312 const QString strJSON = comCloudClient.GetExportParameters(); 313 /* Show error message if necessary: */ 314 if (!comCloudClient.isOk()) 315 msgCenter().cannotAcquireCloudClientParameter(comCloudClient); 316 else 317 { 318 /* Create JSON document and parse it: */ 319 const QJsonDocument document = QJsonDocument::fromJson(strJSON.toUtf8()); 320 if (!document.isEmpty()) 321 m_cloudClientParameters = parseJsonDocument(document); 322 } 323 } 324 } 325 326 /* static */ 327 AbstractVSDParameterList UIWizardExportAppPage2::parseJsonDocument(const QJsonDocument &document) 328 { 329 /* Prepare parameters: */ 330 AbstractVSDParameterList parameters; 331 332 /* Convert document to object, make sure it isn't empty: */ 333 QJsonObject documentObject = document.object(); 334 AssertMsgReturn(!documentObject.isEmpty(), ("Document object is empty!"), parameters); 335 336 /* Iterate through document object values: */ 337 foreach (const QString &strElementName, documentObject.keys()) 338 { 339 //printf("Element name: \"%s\"\n", strElementName.toUtf8().constData()); 340 341 /* Prepare parameter: */ 342 AbstractVSDParameter parameter; 343 344 /* Assign name: */ 345 parameter.name = strElementName; 346 347 /* Acquire element, make sure it's an object: */ 348 const QJsonValue element = documentObject.value(strElementName); 349 AssertMsg(element.isObject(), ("Element '%s' has wrong structure!", strElementName.toUtf8().constData())); 350 if (!element.isObject()) 351 continue; 352 353 /* Convert element to object, make sure it isn't empty: */ 354 const QJsonObject elementObject = element.toObject(); 355 AssertMsg(!elementObject.isEmpty(), ("Element '%s' object has wrong structure!", strElementName.toUtf8().constData())); 356 if (elementObject.isEmpty()) 357 continue; 358 359 /* Iterate through element object values: */ 360 foreach (const QString &strFieldName, elementObject.keys()) 361 { 362 //printf(" Field name: \"%s\"\n", strFieldName.toUtf8().constData()); 363 364 /* Acquire field: */ 365 const QJsonValue field = elementObject.value(strFieldName); 366 367 /* Parse known fields: */ 368 if (strFieldName == "type") 369 parameter.type = (KVirtualSystemDescriptionType)(int)parseJsonFieldDouble(strFieldName, field); 370 else 371 if (strFieldName == "bool") 372 { 373 AbstractVSDParameterBool get; 374 get.value = parseJsonFieldBool(strFieldName, field); 375 parameter.get = QVariant::fromValue(get); 376 parameter.kind = ParameterKind_Bool; 377 } 378 else 379 if (strFieldName == "min") 380 { 381 AbstractVSDParameterDouble get = parameter.get.value<AbstractVSDParameterDouble>(); 382 get.minimum = parseJsonFieldDouble(strFieldName, field); 383 parameter.get = QVariant::fromValue(get); 384 parameter.kind = ParameterKind_Double; 385 } 386 else 387 if (strFieldName == "max") 388 { 389 AbstractVSDParameterDouble get = parameter.get.value<AbstractVSDParameterDouble>(); 390 get.maximum = parseJsonFieldDouble(strFieldName, field); 391 parameter.get = QVariant::fromValue(get); 392 parameter.kind = ParameterKind_Double; 393 } 394 else 395 if (strFieldName == "unit") 396 { 397 AbstractVSDParameterDouble get = parameter.get.value<AbstractVSDParameterDouble>(); 398 get.unit = parseJsonFieldString(strFieldName, field); 399 parameter.get = QVariant::fromValue(get); 400 parameter.kind = ParameterKind_Double; 401 } 402 else 403 if (strFieldName == "items") 404 { 405 AbstractVSDParameterArray get; 406 get.values = parseJsonFieldArray(strFieldName, field); 407 parameter.get = QVariant::fromValue(get); 408 parameter.kind = ParameterKind_Array; 409 } 410 } 411 412 /* Append parameter: */ 413 parameters << parameter; 414 } 415 416 /* Return parameters: */ 417 return parameters; 418 } 419 420 /* static */ 421 bool UIWizardExportAppPage2::parseJsonFieldBool(const QString &strFieldName, const QJsonValue &field) 422 { 423 /* Make sure field is bool: */ 424 Q_UNUSED(strFieldName); 425 AssertMsgReturn(field.isBool(), ("Field '%s' has wrong structure!", strFieldName.toUtf8().constData()), false); 426 const bool fFieldValue = field.toBool(); 427 //printf(" Field value: \"%s\"\n", fFieldValue ? "true" : "false"); 428 429 return fFieldValue; 430 } 431 432 /* static */ 433 double UIWizardExportAppPage2::parseJsonFieldDouble(const QString &strFieldName, const QJsonValue &field) 434 { 435 /* Make sure field is double: */ 436 Q_UNUSED(strFieldName); 437 AssertMsgReturn(field.isDouble(), ("Field '%s' has wrong structure!", strFieldName.toUtf8().constData()), 0); 438 const double dFieldValue = field.toDouble(); 439 //printf(" Field value: \"%f\"\n", dFieldValue); 440 441 return dFieldValue; 442 } 443 444 /* static */ 445 QString UIWizardExportAppPage2::parseJsonFieldString(const QString &strFieldName, const QJsonValue &field) 446 { 447 /* Make sure field is string: */ 448 Q_UNUSED(strFieldName); 449 AssertMsgReturn(field.isString(), ("Field '%s' has wrong structure!", strFieldName.toUtf8().constData()), QString()); 450 const QString strFieldValue = field.toString(); 451 //printf(" Field value: \"%s\"\n", strFieldValue.toUtf8().constData()); 452 453 return strFieldValue; 454 } 455 456 /* static */ 457 QIStringPairList UIWizardExportAppPage2::parseJsonFieldArray(const QString &strFieldName, const QJsonValue &field) 458 { 459 /* Make sure field is array: */ 460 Q_UNUSED(strFieldName); 461 AssertMsgReturn(field.isArray(), ("Field '%s' has wrong structure!", strFieldName.toUtf8().constData()), QIStringPairList()); 462 const QJsonArray fieldValueArray = field.toArray(); 463 QIStringPairList fieldValueStringPairList; 464 /* Parse array: */ 465 for (int i = 0; i < fieldValueArray.count(); ++i) 466 { 467 /* Parse current array value: */ 468 const QJsonValue value = fieldValueArray[i]; 469 /* If value is of string type, we just take it: */ 470 if (value.isString()) 471 fieldValueStringPairList << qMakePair(fieldValueArray[i].toString(), QString()); 472 /* If value is of object type, we take object key/value pairs: */ 473 else if (value.isObject()) 474 { 475 const QJsonObject valueObject = value.toObject(); 476 foreach (const QString &strKey, valueObject.keys()) 477 fieldValueStringPairList << qMakePair(strKey, valueObject.value(strKey).toString()); 478 } 479 } 480 //QStringList test; 481 //foreach (const QIStringPair &pair, fieldValueStringPairList) 482 // if (pair.second.isNull()) 483 // test << QString("{%1}").arg(pair.first); 484 // else 485 // test << QString("{%1 : %2}").arg(pair.first, pair.second); 486 //printf(" Field value: \"%s\"\n", test.join(", ").toUtf8().constData()); 487 488 return fieldValueStringPairList; 489 } 490 290 491 void UIWizardExportAppPage2::updatePageAppearance() 291 492 { … … 518 719 { 519 720 return m_comCloudProfile; 721 } 722 723 AbstractVSDParameterList UIWizardExportAppPage2::cloudClientParameters() const 724 { 725 return m_cloudClientParameters; 520 726 } 521 727 … … 796 1002 this, &UIWizardExportAppPageBasic2::sltHandleAccountButtonClick); 797 1003 1004 /* Register classes: */ 1005 qRegisterMetaType<AbstractVSDParameterList>(); 798 1006 /* Register fields: */ 799 1007 registerField("format", this, "format"); … … 806 1014 registerField("profileName", this, "profileName"); 807 1015 registerField("profile", this, "profile"); 1016 registerField("cloudClientParameters", this, "cloudClientParameters"); 808 1017 } 809 1018 … … 948 1157 || field("format").toString() == "ovf-1.0" 949 1158 || field("format").toString() == "ovf-2.0"; 950 const bool fCSP = isFormatCloudOne();1159 const bool fCSP = field("isFormatCloudOne").toBool(); 951 1160 952 1161 const QString &strFile = field("path").toString().toLower(); … … 959 1168 } 960 1169 1170 return fResult; 1171 } 1172 1173 bool UIWizardExportAppPageBasic2::validatePage() 1174 { 1175 /* Initial result: */ 1176 bool fResult = true; 1177 1178 /* For cloud formats we need to: */ 1179 if (field("isFormatCloudOne").toBool()) 1180 { 1181 /* Populate cloud client parameters: */ 1182 populateCloudClientParameters(); 1183 /* Which is required to continue to the next page: */ 1184 fResult = !field("cloudClientParameters").value<AbstractVSDParameterList>().isEmpty(); 1185 } 1186 1187 /* Return result: */ 961 1188 return fResult; 962 1189 } -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/exportappliance/UIWizardExportAppPageBasic2.h
r75216 r75227 23 23 24 24 /* GUI includes: */ 25 #include "UIApplianceEditorWidget.h" 25 26 #include "UIWizardPage.h" 26 27 … … 86 87 /** Populates account properties. */ 87 88 void populateAccountProperties(); 89 /** Populates cloud client parameters. */ 90 void populateCloudClientParameters(); 91 92 /** Parses JSON @a document. */ 93 static AbstractVSDParameterList parseJsonDocument(const QJsonDocument &document); 94 /** Parses JSON bool @a field. */ 95 static bool parseJsonFieldBool(const QString &strFieldName, const QJsonValue &field); 96 /** Parses JSON double @a field. */ 97 static double parseJsonFieldDouble(const QString &strFieldName, const QJsonValue &field); 98 /** Parses JSON string @a field. */ 99 static QString parseJsonFieldString(const QString &strFieldName, const QJsonValue &field); 100 /** Parses JSON array @a field. */ 101 static QIStringPairList parseJsonFieldArray(const QString &strFieldName, const QJsonValue &field); 88 102 89 103 /** Updates page appearance. */ … … 147 161 /** Returns Cloud Profile object. */ 148 162 CCloudProfile profile() const; 163 /** Returns Cloud Client parameters. */ 164 AbstractVSDParameterList cloudClientParameters() const; 149 165 150 166 /** Holds the Cloud Provider Manager reference. */ 151 CCloudProviderManager m_comCloudProviderManager;167 CCloudProviderManager m_comCloudProviderManager; 152 168 /** Holds the Cloud Provider object reference. */ 153 CCloudProvider m_comCloudProvider;169 CCloudProvider m_comCloudProvider; 154 170 /** Holds the Cloud Profile object reference. */ 155 CCloudProfile m_comCloudProfile; 171 CCloudProfile m_comCloudProfile; 172 /** Holds the cloud client parameters. */ 173 AbstractVSDParameterList m_cloudClientParameters; 156 174 157 175 /** Holds the default appliance name. */ … … 219 237 Q_PROPERTY(QString profileName READ profileName); 220 238 Q_PROPERTY(CCloudProfile profile READ profile); 239 Q_PROPERTY(AbstractVSDParameterList cloudClientParameters READ cloudClientParameters); 221 240 222 241 public: … … 242 261 virtual bool isComplete() const /* override */; 243 262 263 /** Performs page validation. */ 264 virtual bool validatePage() /* override */; 265 244 266 /** Updates page appearance. */ 245 267 virtual void updatePageAppearance() /* override */; -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/exportappliance/UIWizardExportAppPageBasic3.cpp
r75218 r75227 21 21 22 22 /* Qt includes: */ 23 # include <QJsonArray>24 # include <QJsonDocument>25 # include <QJsonObject>26 # include <QJsonValue>27 23 # include <QVBoxLayout> 28 24 … … 37 33 /* COM includes: */ 38 34 # include "CAppliance.h" 39 # include "CCloudClient.h"40 # include "CCloudProfile.h"41 35 # include "CMachine.h" 42 36 … … 50 44 UIWizardExportAppPage3::UIWizardExportAppPage3() 51 45 { 52 }53 54 void UIWizardExportAppPage3::populateCloudClientParameters()55 {56 /* Forget current parameters: */57 m_listCloudClientParameters.clear();58 59 /* Make sure Cloud Profile is not null: */60 CCloudProfile comCloudProfile = fieldImp("profile").value<CCloudProfile>();61 if (comCloudProfile.isNull())62 return;63 64 /* Create Cloud Client: */65 CCloudClient comCloudClient = comCloudProfile.CreateCloudClient();66 /* Show error message if necessary: */67 if (!comCloudProfile.isOk())68 msgCenter().cannotCreateCloudClient(comCloudProfile);69 else70 {71 /* Read Cloud Client parameters for Export VM operation: */72 const QString strJSON = comCloudClient.GetExportParameters();73 /* Show error message if necessary: */74 if (!comCloudClient.isOk())75 msgCenter().cannotAcquireCloudClientParameter(comCloudClient);76 else77 {78 /* Create JSON document and parse it: */79 const QJsonDocument document = QJsonDocument::fromJson(strJSON.toUtf8());80 if (!document.isEmpty())81 m_listCloudClientParameters = parseJsonDocument(document);82 }83 }84 }85 86 /* static */87 AbstractVSDParameterList UIWizardExportAppPage3::parseJsonDocument(const QJsonDocument &document)88 {89 /* Prepare parameters: */90 AbstractVSDParameterList parameters;91 92 /* Convert document to object, make sure it isn't empty: */93 QJsonObject documentObject = document.object();94 AssertMsgReturn(!documentObject.isEmpty(), ("Document object is empty!"), parameters);95 96 /* Iterate through document object values: */97 foreach (const QString &strElementName, documentObject.keys())98 {99 //printf("Element name: \"%s\"\n", strElementName.toUtf8().constData());100 101 /* Prepare parameter: */102 AbstractVSDParameter parameter;103 104 /* Assign name: */105 parameter.name = strElementName;106 107 /* Acquire element, make sure it's an object: */108 const QJsonValue element = documentObject.value(strElementName);109 AssertMsg(element.isObject(), ("Element '%s' has wrong structure!", strElementName.toUtf8().constData()));110 if (!element.isObject())111 continue;112 113 /* Convert element to object, make sure it isn't empty: */114 const QJsonObject elementObject = element.toObject();115 AssertMsg(!elementObject.isEmpty(), ("Element '%s' object has wrong structure!", strElementName.toUtf8().constData()));116 if (elementObject.isEmpty())117 continue;118 119 /* Iterate through element object values: */120 foreach (const QString &strFieldName, elementObject.keys())121 {122 //printf(" Field name: \"%s\"\n", strFieldName.toUtf8().constData());123 124 /* Acquire field: */125 const QJsonValue field = elementObject.value(strFieldName);126 127 /* Parse known fields: */128 if (strFieldName == "type")129 parameter.type = (KVirtualSystemDescriptionType)(int)parseJsonFieldDouble(strFieldName, field);130 else131 if (strFieldName == "bool")132 {133 AbstractVSDParameterBool get;134 get.value = parseJsonFieldBool(strFieldName, field);135 parameter.get = QVariant::fromValue(get);136 parameter.kind = ParameterKind_Bool;137 }138 else139 if (strFieldName == "min")140 {141 AbstractVSDParameterDouble get = parameter.get.value<AbstractVSDParameterDouble>();142 get.minimum = parseJsonFieldDouble(strFieldName, field);143 parameter.get = QVariant::fromValue(get);144 parameter.kind = ParameterKind_Double;145 }146 else147 if (strFieldName == "max")148 {149 AbstractVSDParameterDouble get = parameter.get.value<AbstractVSDParameterDouble>();150 get.maximum = parseJsonFieldDouble(strFieldName, field);151 parameter.get = QVariant::fromValue(get);152 parameter.kind = ParameterKind_Double;153 }154 else155 if (strFieldName == "unit")156 {157 AbstractVSDParameterDouble get = parameter.get.value<AbstractVSDParameterDouble>();158 get.unit = parseJsonFieldString(strFieldName, field);159 parameter.get = QVariant::fromValue(get);160 parameter.kind = ParameterKind_Double;161 }162 else163 if (strFieldName == "items")164 {165 AbstractVSDParameterArray get;166 get.values = parseJsonFieldArray(strFieldName, field);167 parameter.get = QVariant::fromValue(get);168 parameter.kind = ParameterKind_Array;169 }170 }171 172 /* Append parameter: */173 parameters << parameter;174 }175 176 /* Return parameters: */177 return parameters;178 }179 180 /* static */181 bool UIWizardExportAppPage3::parseJsonFieldBool(const QString &strFieldName, const QJsonValue &field)182 {183 /* Make sure field is bool: */184 Q_UNUSED(strFieldName);185 AssertMsgReturn(field.isBool(), ("Field '%s' has wrong structure!", strFieldName.toUtf8().constData()), false);186 const bool fFieldValue = field.toBool();187 //printf(" Field value: \"%s\"\n", fFieldValue ? "true" : "false");188 189 return fFieldValue;190 }191 192 /* static */193 double UIWizardExportAppPage3::parseJsonFieldDouble(const QString &strFieldName, const QJsonValue &field)194 {195 /* Make sure field is double: */196 Q_UNUSED(strFieldName);197 AssertMsgReturn(field.isDouble(), ("Field '%s' has wrong structure!", strFieldName.toUtf8().constData()), 0);198 const double dFieldValue = field.toDouble();199 //printf(" Field value: \"%f\"\n", dFieldValue);200 201 return dFieldValue;202 }203 204 /* static */205 QString UIWizardExportAppPage3::parseJsonFieldString(const QString &strFieldName, const QJsonValue &field)206 {207 /* Make sure field is string: */208 Q_UNUSED(strFieldName);209 AssertMsgReturn(field.isString(), ("Field '%s' has wrong structure!", strFieldName.toUtf8().constData()), QString());210 const QString strFieldValue = field.toString();211 //printf(" Field value: \"%s\"\n", strFieldValue.toUtf8().constData());212 213 return strFieldValue;214 }215 216 /* static */217 QIStringPairList UIWizardExportAppPage3::parseJsonFieldArray(const QString &strFieldName, const QJsonValue &field)218 {219 /* Make sure field is array: */220 Q_UNUSED(strFieldName);221 AssertMsgReturn(field.isArray(), ("Field '%s' has wrong structure!", strFieldName.toUtf8().constData()), QIStringPairList());222 const QJsonArray fieldValueArray = field.toArray();223 QIStringPairList fieldValueStringPairList;224 /* Parse array: */225 for (int i = 0; i < fieldValueArray.count(); ++i)226 {227 /* Parse current array value: */228 const QJsonValue value = fieldValueArray[i];229 /* If value is of string type, we just take it: */230 if (value.isString())231 fieldValueStringPairList << qMakePair(fieldValueArray[i].toString(), QString());232 /* If value is of object type, we take object key/value pairs: */233 else if (value.isObject())234 {235 const QJsonObject valueObject = value.toObject();236 foreach (const QString &strKey, valueObject.keys())237 fieldValueStringPairList << qMakePair(strKey, valueObject.value(strKey).toString());238 }239 }240 //QStringList test;241 //foreach (const QIStringPair &pair, fieldValueStringPairList)242 // if (pair.second.isNull())243 // test << QString("{%1}").arg(pair.first);244 // else245 // test << QString("{%1 : %2}").arg(pair.first, pair.second);246 //printf(" Field value: \"%s\"\n", test.join(", ").toUtf8().constData());247 248 return fieldValueStringPairList;249 46 } 250 47 … … 270 67 if (fieldImp("isFormatCloudOne").toBool()) 271 68 { 272 /* Populate Cloud Client parameters: */ 273 populateCloudClientParameters(); 69 /* Acquire Cloud Client parameters: */ 70 const AbstractVSDParameterList cloudClientParameters = 71 fieldImp("cloudClientParameters").value<AbstractVSDParameterList>(); 274 72 /* Pass them as a list of hints to help editor with names/values: */ 275 m_pApplianceWidget->setVsdHints( m_listCloudClientParameters);73 m_pApplianceWidget->setVsdHints(cloudClientParameters); 276 74 /* Add corresponding Cloud Client fields with default values: */ 277 foreach (const AbstractVSDParameter ¶meter, m_listCloudClientParameters)75 foreach (const AbstractVSDParameter ¶meter, cloudClientParameters) 278 76 { 279 77 QString strValue; -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/exportappliance/UIWizardExportAppPageBasic3.h
r75217 r75227 43 43 UIWizardExportAppPage3(); 44 44 45 /** Populates cloud client parameters. */46 void populateCloudClientParameters();47 48 /** Parses JSON @a document. */49 static AbstractVSDParameterList parseJsonDocument(const QJsonDocument &document);50 /** Parses JSON bool @a field. */51 static bool parseJsonFieldBool(const QString &strFieldName, const QJsonValue &field);52 /** Parses JSON double @a field. */53 static double parseJsonFieldDouble(const QString &strFieldName, const QJsonValue &field);54 /** Parses JSON string @a field. */55 static QString parseJsonFieldString(const QString &strFieldName, const QJsonValue &field);56 /** Parses JSON array @a field. */57 static QIStringPairList parseJsonFieldArray(const QString &strFieldName, const QJsonValue &field);58 59 45 /** Refreshes appliance settings widget. */ 60 46 void refreshApplianceSettingsWidget(); … … 62 48 /** Returns the appliance widget reference. */ 63 49 ExportAppliancePointer applianceWidget() const { return m_pApplianceWidget; } 64 65 /** Holds the cloud client parameters. */66 AbstractVSDParameterList m_listCloudClientParameters;67 50 68 51 /** Holds the appliance widget reference. */ -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/exportappliance/UIWizardExportAppPageExpert.cpp
r75225 r75227 352 352 /* Populate account properties: */ 353 353 populateAccountProperties(); 354 /* Populate cloud client parameters: */ 355 populateCloudClientParameters(); 354 356 355 357 /* Setup connections: */ … … 371 373 qRegisterMetaType<ExportAppliancePointer>(); 372 374 375 /* Register classes: */ 376 qRegisterMetaType<AbstractVSDParameterList>(); 373 377 /* Register fields: */ 374 378 registerField("machineNames", this, "machineNames"); … … 383 387 registerField("profileName", this, "profileName"); 384 388 registerField("profile", this, "profile"); 389 registerField("cloudClientParameters", this, "cloudClientParameters"); 385 390 registerField("applianceWidget", this, "applianceWidget"); 386 391 } … … 532 537 const QString &strFile = field("path").toString().toLower(); 533 538 const QString &strAccount = field("profileName").toString(); 539 const AbstractVSDParameterList ¶meters = field("cloudClientParameters").value<AbstractVSDParameterList>(); 534 540 535 541 fResult = ( fOVF 536 542 && VBoxGlobal::hasAllowedExtension(strFile, OVFFileExts)) 537 543 || ( fCSP 538 && !strAccount.isNull()); 544 && !strAccount.isNull() 545 && !parameters.isEmpty()); 539 546 } 540 547 … … 582 589 populateAccounts(); 583 590 populateAccountProperties(); 591 populateCloudClientParameters(); 584 592 refreshApplianceSettingsWidget(); 585 593 emit completeChanged(); … … 596 604 /* Refresh required settings: */ 597 605 populateAccountProperties(); 606 populateCloudClientParameters(); 607 refreshApplianceSettingsWidget(); 608 emit completeChanged(); 598 609 } 599 610 -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/exportappliance/UIWizardExportAppPageExpert.h
r75225 r75227 45 45 Q_PROPERTY(QString profileName READ profileName); 46 46 Q_PROPERTY(CCloudProfile profile READ profile); 47 Q_PROPERTY(AbstractVSDParameterList cloudClientParameters READ cloudClientParameters); 47 48 Q_PROPERTY(ExportAppliancePointer applianceWidget READ applianceWidget); 48 49
Note:
See TracChangeset
for help on using the changeset viewer.

