Changeset 90394 in vbox
- Timestamp:
- Jul 29, 2021 8:38:39 AM (4 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/manager/UIVirtualBoxManager.cpp
r90389 r90394 1342 1342 if (cloudMachineName(comMachine, strName)) 1343 1343 { 1344 /* Prepare "delete console connection" progress: */ 1345 CProgress comProgress = comMachine.DeleteConsoleConnection(); 1346 if (!comMachine.isOk()) 1347 msgCenter().cannotDeleteConsoleConnection(comMachine); 1348 else 1349 { 1350 /* Show "delete console connection" progress: */ 1351 msgCenter().showModalProgressDialog(comProgress, strName, ":/progress_delete_cloud_vm_90px.png", 0, 0); 1352 if (!comProgress.isOk() || comProgress.GetResultCode() != 0) 1353 msgCenter().cannotDeleteConsoleConnection(comProgress, strName); 1354 } 1344 /* Delete cloud console connection: */ 1345 UINotificationProgressCloudConsoleConnectionDelete *pNotification = 1346 new UINotificationProgressCloudConsoleConnectionDelete(comMachine); 1347 notificationCenter().append(pNotification); 1355 1348 } 1356 1349 } … … 1386 1379 if (cloudMachineName(comMachine, strName)) 1387 1380 { 1388 /* Prepare "delete console connection" progress: */ 1389 CProgress comProgress = comMachine.DeleteConsoleConnection(); 1390 if (!comMachine.isOk()) 1391 msgCenter().cannotDeleteConsoleConnection(comMachine); 1392 else 1393 { 1394 /* Show "delete console connection" progress: */ 1395 msgCenter().showModalProgressDialog(comProgress, strName, ":/progress_delete_cloud_vm_90px.png", 0, 0); 1396 if (!comProgress.isOk() || comProgress.GetResultCode() != 0) 1397 msgCenter().cannotDeleteConsoleConnection(comProgress, strName); 1398 } 1381 /* Delete cloud console connection: */ 1382 UINotificationProgressCloudConsoleConnectionDelete *pNotification = 1383 new UINotificationProgressCloudConsoleConnectionDelete(comMachine); 1384 notificationCenter().append(pNotification); 1399 1385 } 1400 1386 } -
trunk/src/VBox/Frontends/VirtualBox/src/notificationcenter/UINotificationObjects.cpp
r90393 r90394 544 544 545 545 /********************************************************************************************************************************* 546 * Class UINotificationProgressCloudConsoleConnectionDelete implementation. * 547 *********************************************************************************************************************************/ 548 549 UINotificationProgressCloudConsoleConnectionDelete::UINotificationProgressCloudConsoleConnectionDelete(const CCloudMachine &comMachine) 550 : m_comMachine(comMachine) 551 { 552 } 553 554 QString UINotificationProgressCloudConsoleConnectionDelete::name() const 555 { 556 return UINotificationProgress::tr("Deleting cloud console connection ..."); 557 } 558 559 QString UINotificationProgressCloudConsoleConnectionDelete::details() const 560 { 561 return UINotificationProgress::tr("<b>Cloud VM Name:</b> %1").arg(m_strName); 562 } 563 564 CProgress UINotificationProgressCloudConsoleConnectionDelete::createProgress(COMResult &comResult) 565 { 566 /* Acquire cloud VM name: */ 567 m_strName = m_comMachine.GetName(); 568 if (!m_comMachine.isOk()) 569 { 570 comResult = m_comMachine; 571 return CProgress(); 572 } 573 574 /* Initialize progress-wrapper: */ 575 CProgress comProgress = m_comMachine.DeleteConsoleConnection(); 576 /* Store COM result: */ 577 comResult = m_comMachine; 578 /* Return progress-wrapper: */ 579 return comProgress; 580 } 581 582 583 /********************************************************************************************************************************* 546 584 * Class UINotificationProgressApplianceExport implementation. * 547 585 *********************************************************************************************************************************/ -
trunk/src/VBox/Frontends/VirtualBox/src/notificationcenter/UINotificationObjects.h
r90393 r90394 494 494 }; 495 495 496 /** UINotificationProgress extension for cloud console connection delete functionality. */ 497 class SHARED_LIBRARY_STUFF UINotificationProgressCloudConsoleConnectionDelete : public UINotificationProgress 498 { 499 Q_OBJECT; 500 501 public: 502 503 /** Constructs cloud console connection delete notification-progress. 504 * @param comMachine Brings the cloud machine for which console connection being deleted. */ 505 UINotificationProgressCloudConsoleConnectionDelete(const CCloudMachine &comMachine); 506 507 protected: 508 509 /** Returns object name. */ 510 virtual QString name() const /* override final */; 511 /** Returns object details. */ 512 virtual QString details() const /* override final */; 513 /** Creates and returns started progress-wrapper. */ 514 virtual CProgress createProgress(COMResult &comResult) /* override final */; 515 516 private: 517 518 /** Holds the cloud machine for which console connection being deleted. */ 519 CCloudMachine m_comMachine; 520 /** Holds the cloud machine name. */ 521 QString m_strName; 522 }; 523 496 524 /** UINotificationProgress extension for export appliance functionality. */ 497 525 class SHARED_LIBRARY_STUFF UINotificationProgressApplianceExport : public UINotificationProgress
Note:
See TracChangeset
for help on using the changeset viewer.