- Timestamp:
- Sep 8, 2021 12:01:42 PM (3 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/cloud/profilemanager/UICloudProfileManager.cpp
r87352 r91149 35 35 #include "UIIconPool.h" 36 36 #include "UIMessageCenter.h" 37 #include "UINotificationCenter.h" 37 38 #include "UIVirtualBoxEventHandler.h" 38 39 … … 286 287 /* Show error message if necessary: */ 287 288 if (!comCloudProfile.isOk()) 288 msgCenter().cannotAssignCloudProfileParameter(comCloudProfile, this);289 UINotificationMessage::cannotChangeCloudProfileParameter(comCloudProfile); 289 290 else 290 291 { … … 302 303 if (!comCloudProfile.isOk()) 303 304 { 304 msgCenter().cannotAssignCloudProfileParameter(comCloudProfile, this);305 UINotificationMessage::cannotChangeCloudProfileParameter(comCloudProfile); 305 306 break; 306 307 } … … 316 317 /* Show error message if necessary: */ 317 318 if (!comCloudProvider.isOk()) 318 msgCenter().cannotSaveCloudProfiles(comCloudProvider, this);319 UINotificationMessage::cannotSaveCloudProfiles(comCloudProvider); 319 320 } 320 321 } … … 363 364 /* Show error message if necessary: */ 364 365 if (!comCloudProvider.isOk()) 365 msgCenter().cannotCreateCloudProfile(comCloudProvider, this);366 UINotificationMessage::cannotCreateCloudProfile(comCloudProvider); 366 367 else 367 368 { … … 370 371 /* Show error message if necessary: */ 371 372 if (!comCloudProvider.isOk()) 372 msgCenter().cannotSaveCloudProfiles(comCloudProvider, this);373 UINotificationMessage::cannotSaveCloudProfiles(comCloudProvider); 373 374 } 374 375 } … … 398 399 /* Show error message if necessary: */ 399 400 if (!comCloudProvider.isOk()) 400 msgCenter().cannotImportCloudProfiles(comCloudProvider, this);401 UINotificationMessage::cannotImportCloudProfiles(comCloudProvider); 401 402 } 402 403 } … … 434 435 /* Show error message if necessary: */ 435 436 if (!comCloudProfile.isOk()) 436 msgCenter().cannotRemoveCloudProfile(comCloudProfile, this);437 UINotificationMessage::cannotRemoveCloudProfile(comCloudProfile); 437 438 else 438 439 { … … 441 442 /* Show error message if necessary: */ 442 443 if (!comCloudProvider.isOk()) 443 msgCenter().cannotSaveCloudProfiles(comCloudProvider, this);444 UINotificationMessage::cannotSaveCloudProfiles(comCloudProvider); 444 445 } 445 446 } -
trunk/src/VBox/Frontends/VirtualBox/src/globals/UIMessageCenter.cpp
r91146 r91149 1388 1388 } 1389 1389 1390 void UIMessageCenter::cannotAssignCloudProfileParameter(const CCloudProfile &comProfile, QWidget *pParent /* = 0 */) const1391 {1392 error(pParent, MessageType_Error,1393 tr("Failed to assign cloud profile parameter."),1394 UIErrorString::formatErrorInfo(comProfile));1395 }1396 1397 1390 bool UIMessageCenter::cannotRestoreSnapshot(const CMachine &machine, const QString &strSnapshotName, const QString &strMachineName) const 1398 1391 { … … 1411 1404 UIErrorString::formatErrorInfo(progress)); 1412 1405 return false; 1413 }1414 1415 void UIMessageCenter::cannotCreateCloudProfile(const CCloudProvider &comProvider, QWidget *pParent /* = 0 */) const1416 {1417 error(pParent, MessageType_Error,1418 tr("Failed to create cloud profile."),1419 UIErrorString::formatErrorInfo(comProvider));1420 }1421 1422 void UIMessageCenter::cannotRemoveCloudProfile(const CCloudProfile &comProfile, QWidget *pParent /* = 0 */) const1423 {1424 error(pParent, MessageType_Error,1425 tr("Failed to remove cloud profile."),1426 UIErrorString::formatErrorInfo(comProfile));1427 }1428 1429 void UIMessageCenter::cannotSaveCloudProfiles(const CCloudProvider &comProvider, QWidget *pParent /* = 0 */) const1430 {1431 error(pParent, MessageType_Error,1432 tr("Failed to save cloud profiles."),1433 UIErrorString::formatErrorInfo(comProvider));1434 }1435 1436 void UIMessageCenter::cannotImportCloudProfiles(const CCloudProvider &comProvider, QWidget *pParent /* = 0 */) const1437 {1438 error(pParent, MessageType_Error,1439 tr("Failed to import cloud profiles."),1440 UIErrorString::formatErrorInfo(comProvider));1441 1406 } 1442 1407 -
trunk/src/VBox/Frontends/VirtualBox/src/globals/UIMessageCenter.h
r91146 r91149 381 381 void cannotAcquireCloudProviderParameter(const CCloudProvider &comProvider, QWidget *pParent = 0) const; 382 382 void cannotAcquireCloudProfileParameter(const CCloudProfile &comProfile, QWidget *pParent = 0) const; 383 void cannotAssignCloudProfileParameter(const CCloudProfile &comProfile, QWidget *pParent = 0) const;384 383 /** @} */ 385 384 … … 389 388 bool cannotRestoreSnapshot(const CProgress &progress, const QString &strSnapshotName, const QString &strMachineName) const; 390 389 /** @} */ 391 392 /* API: Cloud Profile Manager warnings: */393 void cannotCreateCloudProfile(const CCloudProvider &comProvider, QWidget *pParent = 0) const;394 void cannotRemoveCloudProfile(const CCloudProfile &comProfile, QWidget *pParent = 0) const;395 void cannotSaveCloudProfiles(const CCloudProvider &comProvider, QWidget *pParent = 0) const;396 void cannotImportCloudProfiles(const CCloudProvider &comProvider, QWidget *pParent = 0) const;397 390 398 391 void cannotCreateCloudClient(const CCloudProfile &comProfile, QWidget *pParent = 0) const; -
trunk/src/VBox/Frontends/VirtualBox/src/notificationcenter/UINotificationObjects.cpp
r91142 r91149 36 36 /* COM includes: */ 37 37 #include "CAudioAdapter.h" 38 #include "CCloudProfile.h" 39 #include "CCloudProvider.h" 38 40 #include "CConsole.h" 39 41 #include "CDHCPServer.h" … … 585 587 586 588 /* static */ 589 void UINotificationMessage::cannotChangeCloudProfileParameter(const CCloudProfile &comProfile) 590 { 591 createMessage( 592 QApplication::translate("UIMessageCenter", "Cloud profile failure ..."), 593 QApplication::translate("UIMessageCenter", "Failed to assign cloud profile parameter.") + 594 UIErrorString::formatErrorInfo(comProfile)); 595 } 596 597 /* static */ 587 598 void UINotificationMessage::cannotEnumerateHostUSBDevices(const CHost &comHost) 588 599 { … … 667 678 668 679 /* static */ 680 void UINotificationMessage::cannotFindHostNetworkInterface(const CHost &comHost, const QString &strInterfaceName) 681 { 682 createMessage( 683 QApplication::translate("UIMessageCenter", "Can't find host network interface ..."), 684 QApplication::translate("UIMessageCenter", "Unable to find the host network interface <b>%1</b>.") 685 .arg(strInterfaceName) + 686 UIErrorString::formatErrorInfo(comHost)); 687 } 688 689 /* static */ 690 void UINotificationMessage::cannotFindNATNetwork(const CVirtualBox &comVBox, const QString &strNetworkName) 691 { 692 createMessage( 693 QApplication::translate("UIMessageCenter", "Can't find NAT network ..."), 694 QApplication::translate("UIMessageCenter", "Unable to find the NAT network <b>%1</b>.") 695 .arg(strNetworkName) + 696 UIErrorString::formatErrorInfo(comVBox)); 697 } 698 699 /* static */ 669 700 void UINotificationMessage::cannotCreateDHCPServer(const CVirtualBox &comVBox, const QString &strInterfaceName) 670 701 { … … 706 737 707 738 /* static */ 739 void UINotificationMessage::cannotCreateCloudProfile(const CCloudProvider &comProvider) 740 { 741 createMessage( 742 QApplication::translate("UIMessageCenter", "Can't create cloud profile ..."), 743 QApplication::translate("UIMessageCenter", "Failed to create cloud profile.") + 744 UIErrorString::formatErrorInfo(comProvider)); 745 } 746 747 /* static */ 748 void UINotificationMessage::cannotRemoveCloudProfile(const CCloudProfile &comProfile) 749 { 750 createMessage( 751 QApplication::translate("UIMessageCenter", "Can't remove cloud profile ..."), 752 QApplication::translate("UIMessageCenter", "Failed to remove cloud profile.") + 753 UIErrorString::formatErrorInfo(comProfile)); 754 } 755 756 /* static */ 757 void UINotificationMessage::cannotSaveCloudProfiles(const CCloudProvider &comProvider) 758 { 759 createMessage( 760 QApplication::translate("UIMessageCenter", "Can't save cloud profiles ..."), 761 QApplication::translate("UIMessageCenter", "Failed to save cloud profiles.") + 762 UIErrorString::formatErrorInfo(comProvider)); 763 } 764 765 /* static */ 766 void UINotificationMessage::cannotImportCloudProfiles(const CCloudProvider &comProvider) 767 { 768 createMessage( 769 QApplication::translate("UIMessageCenter", "Can't import cloud profiles ..."), 770 QApplication::translate("UIMessageCenter", "Failed to import cloud profiles.") + 771 UIErrorString::formatErrorInfo(comProvider)); 772 } 773 774 /* static */ 708 775 void UINotificationMessage::cannotCloseMedium(const CMedium &comMedium) 709 776 { … … 756 823 .arg(strSnapshotName, strMachineName) + 757 824 UIErrorString::formatErrorInfo(comSnapshot)); 758 }759 760 /* static */761 void UINotificationMessage::cannotFindHostNetworkInterface(const CHost &comHost, const QString &strInterfaceName)762 {763 createMessage(764 QApplication::translate("UIMessageCenter", "Can't find host network interface ..."),765 QApplication::translate("UIMessageCenter", "Unable to find the host network interface <b>%1</b>.")766 .arg(strInterfaceName) +767 UIErrorString::formatErrorInfo(comHost));768 }769 770 /* static */771 void UINotificationMessage::cannotFindNATNetwork(const CVirtualBox &comVBox, const QString &strNetworkName)772 {773 createMessage(774 QApplication::translate("UIMessageCenter", "Can't find NAT network ..."),775 QApplication::translate("UIMessageCenter", "Unable to find the NAT network <b>%1</b>.")776 .arg(strNetworkName) +777 UIErrorString::formatErrorInfo(comVBox));778 825 } 779 826 -
trunk/src/VBox/Frontends/VirtualBox/src/notificationcenter/UINotificationObjects.h
r91142 r91149 233 233 * @param comNetwork Brings the object parameter being changed for. */ 234 234 static void cannotChangeNATNetworkParameter(const CNATNetwork &comNetwork); 235 /** Notifies about inability to change ICloudProfile parameter. 236 * @param comProfile Brings the object parameter being changed for. */ 237 static void cannotChangeCloudProfileParameter(const CCloudProfile &comProfile); 235 238 236 239 /** Notifies about inability to enumerate host USB devices. … … 263 266 * @param strLocation Brings the machine location. */ 264 267 static void cannotOpenMachine(const CVirtualBox &comVBox, const QString &strLocation); 268 269 /** Notifies about inability to find host network interface. 270 * @param comHost Brings the host being search through. 271 * @param strInterfaceName Brings interface name. */ 272 static void cannotFindHostNetworkInterface(const CHost &comHost, const QString &strInterfaceName); 273 /** Notifies about inability to find NAT network. 274 * @param comVBox Brings common VBox object being search through. 275 * @param strNetworkName Brings network name. */ 276 static void cannotFindNATNetwork(const CVirtualBox &comVBox, const QString &strNetworkName); 265 277 /** Notifies about inability to create DHCP server. 266 278 * @param comVBox Brings common VBox object trying to create DHCP server. … … 279 291 static void cannotRemoveNATNetwork(const CVirtualBox &comVBox, const QString &strNetworkName); 280 292 293 /** Notifies about inability to create cloud profile. 294 * @param comProvider Brings the provider profile being created for. */ 295 static void cannotCreateCloudProfile(const CCloudProvider &comProvider); 296 /** Notifies about inability to remove cloud profile. 297 * @param comProvider Brings the provider profile being removed from. */ 298 static void cannotRemoveCloudProfile(const CCloudProfile &comProfile); 299 /** Notifies about inability to save cloud profiles. 300 * @param comProvider Brings the provider profiles being saved for. */ 301 static void cannotSaveCloudProfiles(const CCloudProvider &comProvider); 302 /** Notifies about inability to import cloud profiles. 303 * @param comProvider Brings the provider profiles being imported for. */ 304 static void cannotImportCloudProfiles(const CCloudProvider &comProvider); 305 281 306 /** Notifies about inability to open machine. 282 307 * @param comMedium Brings the medium being closed. */ … … 299 324 * @param strMachineName Brings machine name. */ 300 325 static void cannotChangeSnapshot(const CSnapshot &comSnapshot, const QString &strSnapshotName, const QString &strMachineName); 301 302 /** Notifies about inability to find host network interface.303 * @param comHost Brings the host being search through.304 * @param strInterfaceName Brings interface name. */305 static void cannotFindHostNetworkInterface(const CHost &comHost, const QString &strInterfaceName);306 /** Notifies about inability to find NAT network.307 * @param comVBox Brings common VBox object being search through.308 * @param strNetworkName Brings network name. */309 static void cannotFindNATNetwork(const CVirtualBox &comVBox, const QString &strNetworkName);310 326 /** @} */ 311 327
Note:
See TracChangeset
for help on using the changeset viewer.