- Timestamp:
- May 28, 2019 2:36:45 PM (6 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/globals/UIMessageCenter.cpp
r78819 r78823 1899 1899 } 1900 1900 1901 void UIMessageCenter::cannotCreateAppliance(const CVirtualBox &comVBox, QWidget *pParent /* = 0 */) const 1902 { 1903 error(pParent, MessageType_Critical, tr("<p>Cannot create a virtual appliance.</p>"), 1904 UIErrorString::formatErrorInfo(comVBox)); 1905 } 1906 1907 void UIMessageCenter::cannotCreateVirtualSystemDescription(const CAppliance &comAppliance, QWidget *pParent /* = 0 */) const 1908 { 1909 error(pParent, MessageType_Critical, tr("<p>Cannot create a virtual system description.</p>"), 1910 UIErrorString::formatErrorInfo(comAppliance)); 1911 } 1912 1913 void UIMessageCenter::cannotAcquireVirtualSystemDescription(const CAppliance &comAppliance, QWidget *pParent /* = 0 */) const 1914 { 1915 error(pParent, MessageType_Critical, tr("<p>Cannot create a virtual system description.</p>"), 1916 UIErrorString::formatErrorInfo(comAppliance)); 1917 } 1918 1919 void UIMessageCenter::cannotAcquireCloudInstanceInfo(const CCloudClient &comClient, QWidget *pParent /* = 0 */) const 1920 { 1921 error(pParent, MessageType_Critical, tr("<p>Cannot acquire a cloud instance information.</p>"), 1922 UIErrorString::formatErrorInfo(comClient)); 1923 } 1924 1901 1925 void UIMessageCenter::cannotImportAppliance(CAppliance &appliance, QWidget *pParent /* = 0*/) const 1902 1926 { -
trunk/src/VBox/Frontends/VirtualBox/src/globals/UIMessageCenter.h
r78819 r78823 404 404 void cannotRewriteMachineFolder(const QString &strFolderName, QWidget *pParent = 0) const; 405 405 void cannotCreateMachineFolder(const QString &strFolderName, QWidget *pParent = 0) const; 406 void cannotCreateAppliance(const CVirtualBox &comVBox, QWidget *pParent = 0) const; 407 void cannotCreateVirtualSystemDescription(const CAppliance &comAppliance, QWidget *pParent = 0) const; 408 void cannotAcquireVirtualSystemDescription(const CAppliance &comAppliance, QWidget *pParent = 0) const; 409 void cannotAcquireCloudInstanceInfo(const CCloudClient &comClient, QWidget *pParent = 0) const; 406 410 void cannotImportAppliance(CAppliance &appliance, QWidget *pParent = 0) const; 407 411 void cannotImportAppliance(const CProgress &progress, const QString &strPath, QWidget *pParent = 0) const; -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/importappliance/UIWizardImportAppPageBasic1.cpp
r78273 r78823 39 39 40 40 /* COM includes: */ 41 #include "CAppliance.h" 41 42 #include "CStringArray.h" 42 43 … … 334 335 if (!m_comCloudClient.isNull()) 335 336 { 336 /* Read Cloud Client description form: */337 CVirtual SystemDescriptionForm comForm;338 C Progress comProgress = m_comCloudClient.GetExportLaunchDescriptionForm(comForm);337 /* Create appliance: */ 338 CVirtualBox comVBox = vboxGlobal().virtualBox(); 339 CAppliance comAppliance = comVBox.CreateAppliance(); 339 340 340 341 /* Show error message if necessary: */ 341 if (! m_comCloudClient.isOk())342 msgCenter().cannot AcquireCloudClientParameter(m_comCloudClient);342 if (!comVBox.isOk()) 343 msgCenter().cannotCreateAppliance(comVBox); 343 344 else 344 345 { 345 /* Show "Acquire export form" progress: */ 346 msgCenter().showModalProgressDialog(comProgress, 347 UIWizardImportApp::tr("Acquire export form..."), 348 ":/progress_reading_appliance_90px.png", 349 0, 0); 346 /* Create virtual system description: */ 347 comAppliance.CreateVirtualSystemDescriptions(1); 350 348 351 349 /* Show error message if necessary: */ 352 if (!com Progress.isOk() || comProgress.GetResultCode() != 0)353 msgCenter().cannot AcquireCloudClientParameter(comProgress);350 if (!comAppliance.isOk()) 351 msgCenter().cannotCreateVirtualSystemDescription(comAppliance); 354 352 else 355 m_comVSDForm = comForm; 353 { 354 /* Acquire virtual system description: */ 355 QVector<CVirtualSystemDescription> descriptions = comAppliance.GetVirtualSystemDescriptions(); 356 357 /* Show error message if necessary: */ 358 if (!comAppliance.isOk()) 359 msgCenter().cannotAcquireVirtualSystemDescription(comAppliance); 360 else 361 { 362 /* Make sure there is at least one virtual system description created: */ 363 AssertReturnVoid(!descriptions.isEmpty()); 364 CVirtualSystemDescription comDescription = descriptions.at(0); 365 366 /* Load default virtual system description values: */ 367 /// @todo make sure this is a progress returning call 368 m_comCloudClient.GetInstanceInfo(machineId(), comDescription); 369 370 /* Show error message if necessary: */ 371 if (!m_comCloudClient.isOk()) 372 msgCenter().cannotAcquireCloudInstanceInfo(m_comCloudClient); 373 else 374 { 375 /* Read Cloud Client description form: */ 376 CVirtualSystemDescriptionForm comForm; 377 CProgress comProgress = m_comCloudClient.GetImportDescriptionForm(comDescription, comForm); 378 379 /* Show error message if necessary: */ 380 if (!m_comCloudClient.isOk()) 381 msgCenter().cannotAcquireCloudClientParameter(m_comCloudClient); 382 else 383 { 384 /* Show "Acquire export form" progress: */ 385 msgCenter().showModalProgressDialog(comProgress, 386 UIWizardImportApp::tr("Acquire export form..."), 387 ":/progress_reading_appliance_90px.png", 388 0, 0); 389 390 /* Show error message if necessary: */ 391 if (!comProgress.isOk() || comProgress.GetResultCode() != 0) 392 msgCenter().cannotAcquireCloudClientParameter(comProgress); 393 else 394 m_comVSDForm = comForm; 395 } 396 } 397 } 398 } 356 399 } 357 400 }
Note:
See TracChangeset
for help on using the changeset viewer.