Changeset 83993 in vbox for trunk/src/VBox/Frontends
- Timestamp:
- Apr 27, 2020 10:42:16 AM (5 years ago)
- svn:sync-xref-src-repo-rev:
- 137560
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/cloud/machinesettings/UICloudMachineSettingsDialog.cpp
r83963 r83993 25 25 #include "UICloudMachineSettingsDialog.h" 26 26 #include "UICloudMachineSettingsDialogPage.h" 27 #include "UICloudNetworkingStuff.h" 27 28 28 29 /* COM includes: */ … … 50 51 void UICloudMachineSettingsDialog::accept() 51 52 { 52 /* *Makes sure page data committed: */53 /* Makes sure page data committed: */ 53 54 if (m_pPage) 54 55 m_pPage->makeSureDataCommitted(); … … 88 89 { 89 90 /* Update name: */ 90 m_strName = m_comCloudMachine.GetName(); 91 if (!m_comCloudMachine.isOk()) 92 { 93 msgCenter().cannotAcquireCloudMachineParameter(m_comCloudMachine, this); 91 if (!cloudMachineName(m_comCloudMachine, m_strName, this)) 94 92 reject(); 95 }96 93 97 94 /* Retranslate title: */ … … 99 96 100 97 /* Update form: */ 101 CForm comForm; 102 CProgress comProgress = m_comCloudMachine.GetSettingsForm(comForm); 103 if (!m_comCloudMachine.isOk()) 104 { 105 msgCenter().cannotAcquireCloudMachineParameter(m_comCloudMachine, this); 98 if (!cloudMachineSettingsForm(m_comCloudMachine, m_comForm, this)) 106 99 reject(); 107 }108 msgCenter().showModalProgressDialog(comProgress,109 m_strName,110 ":/progress_settings_90px.png", this, 0);111 if (!comProgress.isOk() || comProgress.GetResultCode() != 0)112 {113 msgCenter().cannotAcquireCloudClientParameter(comProgress, this);114 reject();115 }116 m_comForm = comForm;117 100 118 101 /* Assign page with form: */ -
trunk/src/VBox/Frontends/VirtualBox/src/globals/UICloudNetworkingStuff.cpp
r83992 r83993 24 24 /* COM includes: */ 25 25 #include "CAppliance.h" 26 #include "CForm.h" 26 27 #include "CProgress.h" 27 28 #include "CStringArray.h" … … 201 202 } 202 203 enmResult = enmState; 204 return true; 205 } 206 207 bool UICloudNetworkingStuff::cloudMachineSettingsForm(CCloudMachine &comCloudMachine, 208 CForm &comResult, 209 QWidget *pParent /* = 0 */) 210 { 211 /* Acquire machine name first: */ 212 QString strMachineName; 213 if (!cloudMachineName(comCloudMachine, strMachineName)) 214 return false; 215 216 /* Prepare settings form: */ 217 CForm comForm; 218 219 /* Now execute GetSettingsForm async method: */ 220 CProgress comProgress = comCloudMachine.GetSettingsForm(comForm); 221 if (!comCloudMachine.isOk()) 222 { 223 msgCenter().cannotAcquireCloudMachineParameter(comCloudMachine, pParent); 224 return false; 225 } 226 227 /* Show "Get settings form" progress: */ 228 msgCenter().showModalProgressDialog(comProgress, 229 strMachineName, 230 ":/progress_settings_90px.png", pParent, 0); 231 if (!comProgress.isOk() || comProgress.GetResultCode() != 0) 232 { 233 msgCenter().cannotAcquireCloudClientParameter(comProgress, pParent); 234 return false; 235 } 236 237 /* Return result: */ 238 comResult = comForm; 203 239 return true; 204 240 } -
trunk/src/VBox/Frontends/VirtualBox/src/globals/UICloudNetworkingStuff.h
r83992 r83993 75 75 KMachineState &enmResult, 76 76 QWidget *pParent = 0); 77 78 /** Acquires @a comCloudMachine settings form as a @a comResult, using @a pParent to show messages according to. 79 * @note Be aware, this is a blocking function, corresponding progress dialog will be executed. */ 80 SHARED_LIBRARY_STUFF bool cloudMachineSettingsForm(CCloudMachine &comCloudMachine, 81 CForm &comResult, 82 QWidget *pParent = 0); 77 83 78 84 /** Acquires instance map.
Note:
See TracChangeset
for help on using the changeset viewer.