VirtualBox

Changeset 83907 in vbox for trunk/src/VBox/Frontends


Ignore:
Timestamp:
Apr 21, 2020 5:45:43 PM (5 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
137444
Message:

FE/Qt: bugref:9653: VirtualBox Manager: Cleanup for UIVirtualMachineItemCloud; Pause/resume stuff is no more required since r137273.

Location:
trunk/src/VBox/Frontends/VirtualBox/src/manager
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/manager/UIVirtualMachineItemCloud.cpp

    r83755 r83907  
    5959{
    6060    QTimer::singleShot(fDelayed ? 10000 : 0, this, SLOT(sltCreateGetCloudInstanceInfoTask()));
    61 }
    62 
    63 void UIVirtualMachineItemCloud::pause(QWidget *pParent)
    64 {
    65     pauseOrResume(true /* pause? */, pParent);
    66 }
    67 
    68 void UIVirtualMachineItemCloud::resume(QWidget *pParent)
    69 {
    70     pauseOrResume(false /* pause? */, pParent);
    71 }
    72 
    73 void UIVirtualMachineItemCloud::pauseOrResume(bool fPause, QWidget *pParent)
    74 {
    75     /* Execute async method: */
    76     CProgress comProgress;
    77     if (fPause)
    78         comProgress = m_comCloudMachine.PowerDown();
    79     else
    80         comProgress = m_comCloudMachine.PowerUp();
    81     if (!m_comCloudMachine.isOk())
    82         msgCenter().cannotAcquireCloudMachineParameter(m_comCloudMachine);
    83     else
    84     {
    85         /* Show progress: */
    86         /// @todo use proper pause icon
    87         if (fPause)
    88             msgCenter().showModalProgressDialog(comProgress, UICommon::tr("Pause instance ..."),
    89                                                 ":/progress_reading_appliance_90px.png", pParent, 0);
    90         else
    91             msgCenter().showModalProgressDialog(comProgress, UICommon::tr("Start instance ..."),
    92                                                 ":/progress_start_90px.png", pParent, 0);
    93         if (!comProgress.isOk() || comProgress.GetResultCode() != 0)
    94             msgCenter().cannotAcquireCloudClientParameter(comProgress);
    95         else
    96             updateInfoAsync(false /* delayed? */);
    97     }
    9861}
    9962
  • trunk/src/VBox/Frontends/VirtualBox/src/manager/UIVirtualMachineItemCloud.h

    r83755 r83907  
    7474        /** Updates cloud VM info async way, @a fDelayed if requested or instant otherwise. */
    7575        void updateInfoAsync(bool fDelayed);
    76 
    77         /** Puts cloud VM on pause.
    78           * @param  pWidget  Brings parent widget to show messages according to. */
    79         void pause(QWidget *pParent);
    80         /** Resumes cloud VM execution.
    81           * @param  pWidget  Brings parent widget to show messages according to. */
    82         void resume(QWidget *pParent);
    83         /** Wrapper to handle two tasks above.
    84           * @param  fPause   Brings whether cloud VM should be paused or resumed otherwise.
    85           * @param  pWidget  Brings parent widget to show messages according to. */
    86         void pauseOrResume(bool fPause, QWidget *pParent);
    8776    /** @} */
    8877
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