Changeset 83962 in vbox
- Timestamp:
- Apr 24, 2020 9:45:59 AM (5 years ago)
- svn:sync-xref-src-repo-rev:
- 137527
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/globals/UICommon.cpp
r83858 r83962 2459 2459 if (!comMachine.isOk()) 2460 2460 { 2461 msgCenter().cannotAcquire MachineParameter(comMachine);2461 msgCenter().cannotAcquireCloudMachineParameter(comMachine); 2462 2462 return false; 2463 2463 } … … 2467 2467 if (!comMachine.isOk()) 2468 2468 { 2469 msgCenter().cannotPowerUp Machine(comMachine);2469 msgCenter().cannotPowerUpCloudMachine(comMachine); 2470 2470 return false; 2471 2471 } … … 2475 2475 if (!comProgress.isOk() || comProgress.GetResultCode() != 0) 2476 2476 { 2477 msgCenter().cannotPowerUp Machine(comProgress, strName);2477 msgCenter().cannotPowerUpCloudMachine(comProgress, strName); 2478 2478 return false; 2479 2479 } -
trunk/src/VBox/Frontends/VirtualBox/src/globals/UIMessageCenter.cpp
r83768 r83962 605 605 606 606 void UIMessageCenter::cannotAcquireMachineParameter(const CMachine &comMachine, QWidget *pParent /* = 0 */) const 607 {608 /* Show the error: */609 error(pParent, MessageType_Error,610 tr("Failed to acquire machine parameter."), UIErrorString::formatErrorInfo(comMachine));611 }612 613 void UIMessageCenter::cannotAcquireMachineParameter(const CCloudMachine &comMachine, QWidget *pParent /* = 0 */) const614 607 { 615 608 /* Show the error: */ … … 925 918 } 926 919 927 void UIMessageCenter::cannotACPIShutdown Machine(const CCloudMachine &comMachine) const928 { 929 error(0, MessageType_Error, 930 tr("Failed to send the ACPI Power Button press event to virtual machine <b>%1</b>.")920 void UIMessageCenter::cannotACPIShutdownCloudMachine(const CCloudMachine &comMachine) const 921 { 922 error(0, MessageType_Error, 923 tr("Failed to send the ACPI Power Button press event to the virtual machine <b>%1</b>.") 931 924 .arg(CCloudMachine(comMachine).GetName()), 932 925 UIErrorString::formatErrorInfo(comMachine)); 933 926 } 934 927 935 void UIMessageCenter::cannotACPIShutdown Machine(const CProgress &progress, const QString &strMachineName) const936 { 937 error(0, MessageType_Error, 938 tr("Failed to send the ACPI Power Button press event to virtual machine <b>%1</b>.")928 void UIMessageCenter::cannotACPIShutdownCloudMachine(const CProgress &comProgress, const QString &strMachineName) const 929 { 930 error(0, MessageType_Error, 931 tr("Failed to send the ACPI Power Button press event to the virtual machine <b>%1</b>.") 939 932 .arg(strMachineName), 940 UIErrorString::formatErrorInfo( progress));941 } 942 943 void UIMessageCenter::cannotPowerUp Machine(const CCloudMachine &comMachine) const933 UIErrorString::formatErrorInfo(comProgress)); 934 } 935 936 void UIMessageCenter::cannotPowerUpCloudMachine(const CCloudMachine &comMachine) const 944 937 { 945 938 error(0, MessageType_Error, … … 949 942 } 950 943 951 void UIMessageCenter::cannotPowerUp Machine(const CProgress &comProgress, const QString &strMachineName) const944 void UIMessageCenter::cannotPowerUpCloudMachine(const CProgress &comProgress, const QString &strMachineName) const 952 945 { 953 946 error(0, MessageType_Error, … … 957 950 } 958 951 959 void UIMessageCenter::cannotPowerDownMachine(const CConsole &co nsole) const952 void UIMessageCenter::cannotPowerDownMachine(const CConsole &comConsole) const 960 953 { 961 954 error(0, MessageType_Error, 962 955 tr("Failed to stop the virtual machine <b>%1</b>.") 963 .arg(CConsole(console).GetMachine().GetName()), 964 UIErrorString::formatErrorInfo(console)); 965 } 966 967 void UIMessageCenter::cannotPowerDownMachine(const CCloudMachine &comMachine) const 956 .arg(CConsole(comConsole).GetMachine().GetName()), 957 UIErrorString::formatErrorInfo(comConsole)); 958 } 959 960 void UIMessageCenter::cannotPowerDownMachine(const CProgress &comProgress, const QString &strMachineName) const 961 { 962 error(0, MessageType_Error, 963 tr("Failed to stop the virtual machine <b>%1</b>.") 964 .arg(strMachineName), 965 UIErrorString::formatErrorInfo(comProgress)); 966 } 967 968 void UIMessageCenter::cannotPowerDownCloudMachine(const CCloudMachine &comMachine) const 968 969 { 969 970 error(0, MessageType_Error, … … 973 974 } 974 975 975 void UIMessageCenter::cannotPowerDown Machine(const CProgress &progress, const QString &strMachineName) const976 void UIMessageCenter::cannotPowerDownCloudMachine(const CProgress &comProgress, const QString &strMachineName) const 976 977 { 977 978 error(0, MessageType_Error, 978 979 tr("Failed to stop the virtual machine <b>%1</b>.") 979 980 .arg(strMachineName), 980 UIErrorString::formatErrorInfo( progress));981 UIErrorString::formatErrorInfo(comProgress)); 981 982 } 982 983 -
trunk/src/VBox/Frontends/VirtualBox/src/globals/UIMessageCenter.h
r83768 r83962 265 265 void cannotAcquireVirtualBoxParameter(const CVirtualBox &comVBox, QWidget *pParent = 0) const; 266 266 void cannotAcquireMachineParameter(const CMachine &comMachine, QWidget *pParent = 0) const; 267 void cannotAcquireMachineParameter(const CCloudMachine &comMachine, QWidget *pParent = 0) const;268 267 269 268 /* API: Global cloud warnings: */ … … 294 293 void cannotSaveMachineState(const CProgress &progress, const QString &strMachineName); 295 294 void cannotACPIShutdownMachine(const CConsole &console) const; 296 void cannotACPIShutdownMachine(const CCloudMachine &comMachine) const; 297 void cannotACPIShutdownMachine(const CProgress &progress, const QString &strMachineName) const; 298 void cannotPowerUpMachine(const CCloudMachine &comMachine) const; 299 void cannotPowerUpMachine(const CProgress &comProgress, const QString &strMachineName) const; 300 void cannotPowerDownMachine(const CConsole &console) const; 301 void cannotPowerDownMachine(const CCloudMachine &comMachine) const; 302 void cannotPowerDownMachine(const CProgress &progress, const QString &strMachineName) const; 295 void cannotACPIShutdownCloudMachine(const CCloudMachine &comMachine) const; 296 void cannotACPIShutdownCloudMachine(const CProgress &comProgress, const QString &strMachineName) const; 297 void cannotPowerUpCloudMachine(const CCloudMachine &comMachine) const; 298 void cannotPowerUpCloudMachine(const CProgress &comProgress, const QString &strMachineName) const; 299 void cannotPowerDownMachine(const CConsole &comConsole) const; 300 void cannotPowerDownMachine(const CProgress &comProgress, const QString &strMachineName) const; 301 void cannotPowerDownCloudMachine(const CCloudMachine &comMachine) const; 302 void cannotPowerDownCloudMachine(const CProgress &comProgress, const QString &strMachineName) const; 303 303 bool confirmStartMultipleMachines(const QString &strNames) const; 304 304 void cannotMoveMachine(const CMachine &machine, QWidget *pParent = 0) const; -
trunk/src/VBox/Frontends/VirtualBox/src/manager/UIVirtualBoxManager.cpp
r83960 r83962 990 990 CProgress comProgress = comCloudMachine.Shutdown(); 991 991 if (!comCloudMachine.isOk()) 992 msgCenter().cannotACPIShutdown Machine(comCloudMachine);992 msgCenter().cannotACPIShutdownCloudMachine(comCloudMachine); 993 993 else 994 994 { … … 996 996 msgCenter().showModalProgressDialog(comProgress, pItem->name(), ":/progress_poweroff_90px.png"); 997 997 if (!comProgress.isOk() || comProgress.GetResultCode() != 0) 998 msgCenter().cannotACPIShutdown Machine(comProgress, pItem->name());998 msgCenter().cannotACPIShutdownCloudMachine(comProgress, pItem->name()); 999 999 /* Update info in any case: */ 1000 1000 pItem->toCloud()->updateInfoAsync(false /* delayed? */); … … 1063 1063 CProgress comProgress = comCloudMachine.PowerDown(); 1064 1064 if (!comCloudMachine.isOk()) 1065 msgCenter().cannotPowerDown Machine(comCloudMachine);1065 msgCenter().cannotPowerDownCloudMachine(comCloudMachine); 1066 1066 else 1067 1067 { … … 1069 1069 msgCenter().showModalProgressDialog(comProgress, pItem->name(), ":/progress_poweroff_90px.png"); 1070 1070 if (!comProgress.isOk() || comProgress.GetResultCode() != 0) 1071 msgCenter().cannotPowerDown Machine(comProgress, pItem->name());1071 msgCenter().cannotPowerDownCloudMachine(comProgress, pItem->name()); 1072 1072 /* Update info in any case: */ 1073 1073 pItem->toCloud()->updateInfoAsync(false /* delayed? */); -
trunk/src/VBox/Frontends/VirtualBox/src/manager/chooser/UIChooserModel.cpp
r83949 r83962 1720 1720 if (!comMachine.isOk()) 1721 1721 { 1722 msgCenter().cannotAcquire MachineParameter(comMachine);1722 msgCenter().cannotAcquireCloudMachineParameter(comMachine); 1723 1723 continue; 1724 1724 }
Note:
See TracChangeset
for help on using the changeset viewer.