VirtualBox

Changeset 83962 in vbox


Ignore:
Timestamp:
Apr 24, 2020 9:45:59 AM (5 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
137527
Message:

FE/Qt: bugref:9653: Cleanup for cloud related message-center stuff.

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  
    24592459    if (!comMachine.isOk())
    24602460    {
    2461         msgCenter().cannotAcquireMachineParameter(comMachine);
     2461        msgCenter().cannotAcquireCloudMachineParameter(comMachine);
    24622462        return false;
    24632463    }
     
    24672467    if (!comMachine.isOk())
    24682468    {
    2469         msgCenter().cannotPowerUpMachine(comMachine);
     2469        msgCenter().cannotPowerUpCloudMachine(comMachine);
    24702470        return false;
    24712471    }
     
    24752475    if (!comProgress.isOk() || comProgress.GetResultCode() != 0)
    24762476    {
    2477         msgCenter().cannotPowerUpMachine(comProgress, strName);
     2477        msgCenter().cannotPowerUpCloudMachine(comProgress, strName);
    24782478        return false;
    24792479    }
  • trunk/src/VBox/Frontends/VirtualBox/src/globals/UIMessageCenter.cpp

    r83768 r83962  
    605605
    606606void 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 */) const
    614607{
    615608    /* Show the error: */
     
    925918}
    926919
    927 void UIMessageCenter::cannotACPIShutdownMachine(const CCloudMachine &comMachine) const
    928 {
    929     error(0, MessageType_Error,
    930           tr("Failed to send the ACPI Power Button press event to virtual machine <b>%1</b>.")
     920void 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>.")
    931924             .arg(CCloudMachine(comMachine).GetName()),
    932925          UIErrorString::formatErrorInfo(comMachine));
    933926}
    934927
    935 void UIMessageCenter::cannotACPIShutdownMachine(const CProgress &progress, const QString &strMachineName) const
    936 {
    937     error(0, MessageType_Error,
    938           tr("Failed to send the ACPI Power Button press event to virtual machine <b>%1</b>.")
     928void 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>.")
    939932             .arg(strMachineName),
    940           UIErrorString::formatErrorInfo(progress));
    941 }
    942 
    943 void UIMessageCenter::cannotPowerUpMachine(const CCloudMachine &comMachine) const
     933          UIErrorString::formatErrorInfo(comProgress));
     934}
     935
     936void UIMessageCenter::cannotPowerUpCloudMachine(const CCloudMachine &comMachine) const
    944937{
    945938    error(0, MessageType_Error,
     
    949942}
    950943
    951 void UIMessageCenter::cannotPowerUpMachine(const CProgress &comProgress, const QString &strMachineName) const
     944void UIMessageCenter::cannotPowerUpCloudMachine(const CProgress &comProgress, const QString &strMachineName) const
    952945{
    953946    error(0, MessageType_Error,
     
    957950}
    958951
    959 void UIMessageCenter::cannotPowerDownMachine(const CConsole &console) const
     952void UIMessageCenter::cannotPowerDownMachine(const CConsole &comConsole) const
    960953{
    961954    error(0, MessageType_Error,
    962955          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
     960void 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
     968void UIMessageCenter::cannotPowerDownCloudMachine(const CCloudMachine &comMachine) const
    968969{
    969970    error(0, MessageType_Error,
     
    973974}
    974975
    975 void UIMessageCenter::cannotPowerDownMachine(const CProgress &progress, const QString &strMachineName) const
     976void UIMessageCenter::cannotPowerDownCloudMachine(const CProgress &comProgress, const QString &strMachineName) const
    976977{
    977978    error(0, MessageType_Error,
    978979          tr("Failed to stop the virtual machine <b>%1</b>.")
    979980             .arg(strMachineName),
    980           UIErrorString::formatErrorInfo(progress));
     981          UIErrorString::formatErrorInfo(comProgress));
    981982}
    982983
  • trunk/src/VBox/Frontends/VirtualBox/src/globals/UIMessageCenter.h

    r83768 r83962  
    265265    void cannotAcquireVirtualBoxParameter(const CVirtualBox &comVBox, QWidget *pParent = 0) const;
    266266    void cannotAcquireMachineParameter(const CMachine &comMachine, QWidget *pParent = 0) const;
    267     void cannotAcquireMachineParameter(const CCloudMachine &comMachine, QWidget *pParent = 0) const;
    268267
    269268    /* API: Global cloud warnings: */
     
    294293    void cannotSaveMachineState(const CProgress &progress, const QString &strMachineName);
    295294    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;
    303303    bool confirmStartMultipleMachines(const QString &strNames) const;
    304304    void cannotMoveMachine(const CMachine &machine, QWidget *pParent = 0) const;
  • trunk/src/VBox/Frontends/VirtualBox/src/manager/UIVirtualBoxManager.cpp

    r83960 r83962  
    990990            CProgress comProgress = comCloudMachine.Shutdown();
    991991            if (!comCloudMachine.isOk())
    992                 msgCenter().cannotACPIShutdownMachine(comCloudMachine);
     992                msgCenter().cannotACPIShutdownCloudMachine(comCloudMachine);
    993993            else
    994994            {
     
    996996                msgCenter().showModalProgressDialog(comProgress, pItem->name(), ":/progress_poweroff_90px.png");
    997997                if (!comProgress.isOk() || comProgress.GetResultCode() != 0)
    998                     msgCenter().cannotACPIShutdownMachine(comProgress, pItem->name());
     998                    msgCenter().cannotACPIShutdownCloudMachine(comProgress, pItem->name());
    999999                /* Update info in any case: */
    10001000                pItem->toCloud()->updateInfoAsync(false /* delayed? */);
     
    10631063            CProgress comProgress = comCloudMachine.PowerDown();
    10641064            if (!comCloudMachine.isOk())
    1065                 msgCenter().cannotPowerDownMachine(comCloudMachine);
     1065                msgCenter().cannotPowerDownCloudMachine(comCloudMachine);
    10661066            else
    10671067            {
     
    10691069                msgCenter().showModalProgressDialog(comProgress, pItem->name(), ":/progress_poweroff_90px.png");
    10701070                if (!comProgress.isOk() || comProgress.GetResultCode() != 0)
    1071                     msgCenter().cannotPowerDownMachine(comProgress, pItem->name());
     1071                    msgCenter().cannotPowerDownCloudMachine(comProgress, pItem->name());
    10721072                /* Update info in any case: */
    10731073                pItem->toCloud()->updateInfoAsync(false /* delayed? */);
  • trunk/src/VBox/Frontends/VirtualBox/src/manager/chooser/UIChooserModel.cpp

    r83949 r83962  
    17201720        if (!comMachine.isOk())
    17211721        {
    1722             msgCenter().cannotAcquireMachineParameter(comMachine);
     1722            msgCenter().cannotAcquireCloudMachineParameter(comMachine);
    17231723            continue;
    17241724        }
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette