Changeset 98724 in vbox
- Timestamp:
- Feb 24, 2023 2:10:32 PM (21 months ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/runtime
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachine.cpp
r98722 r98724 354 354 { 355 355 return uisession()->setPause(fPause); 356 } 357 358 bool UIMachine::saveSettings() 359 { 360 return uisession()->saveSettings(); 356 361 } 357 362 -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachine.h
r98722 r98724 246 246 /** Performes VM pausing/resuming depending on @a fPause state. */ 247 247 bool setPause(bool fPause); 248 /** @} */ 249 250 /** @name Machine-data stuff. 251 ** @{ */ 252 /** Saves machine data. */ 253 bool saveSettings(); 248 254 /** @} */ 249 255 -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineLogic.cpp
r98722 r98724 1980 1980 } 1981 1981 1982 /* Save machine-settings: */ 1983 machine().SaveSettings(); 1984 if (!machine().isOk()) 1985 { 1986 /* Make sure action is updated: */ 1987 uimachine()->updateStateRecordingAction(); 1988 /* Notify about the error: */ 1989 return UINotificationMessage::cannotSaveMachineSettings(machine()); 1990 } 1982 /* Save machine-settings, make sure action is updated in case of failure: */ 1983 if (!uimachine()->saveSettings()) 1984 return uimachine()->updateStateRecordingAction(); 1991 1985 } 1992 1986 … … 2016 2010 } 2017 2011 2018 /* Save machine-settings: */ 2019 machine().SaveSettings(); 2020 if (!machine().isOk()) 2021 { 2022 /* Make sure action is updated: */ 2023 uimachine()->updateStateVRDEServerAction(); 2024 /* Notify about the error: */ 2025 return UINotificationMessage::cannotSaveMachineSettings(machine()); 2026 } 2012 /* Save machine-settings, make sure action is updated in case of failure: */ 2013 if (!uimachine()->saveSettings()) 2014 return uimachine()->updateStateVRDEServerAction(); 2027 2015 } 2028 2016 … … 2217 2205 } 2218 2206 2219 /* Save machine-settings: */ 2220 machine().SaveSettings(); 2221 if (!machine().isOk()) 2222 { 2223 /* Make sure action is updated: */ 2224 uimachine()->updateStateAudioActions(); 2225 /* Notify about the error: */ 2226 return UINotificationMessage::cannotSaveMachineSettings(machine()); 2227 } 2207 /* Save machine-settings, make sure action is updated in case of failure: */ 2208 if (!uimachine()->saveSettings()) 2209 return uimachine()->updateStateAudioActions(); 2228 2210 } 2229 2211 … … 2254 2236 } 2255 2237 2256 /* Save machine-settings: */ 2257 machine().SaveSettings(); 2258 if (!machine().isOk()) 2259 { 2260 /* Make sure action is updated: */ 2261 uimachine()->updateStateAudioActions(); 2262 /* Notify about the error: */ 2263 return UINotificationMessage::cannotSaveMachineSettings(machine()); 2264 } 2238 /* Save machine-settings, make sure action is updated in case of failure: */ 2239 if (!uimachine()->saveSettings()) 2240 return uimachine()->updateStateAudioActions(); 2265 2241 } 2266 2242 … … 2350 2326 2351 2327 /* Save machine-settings: */ 2352 machine().SaveSettings(); 2353 if (!machine().isOk()) 2354 return UINotificationMessage::cannotSaveMachineSettings(machine()); 2328 uimachine()->saveSettings(); 2355 2329 } 2356 2330 … … 3187 3161 msgCenter().cannotRemountMedium(comMachine, guiMedium, true /* mount? */, false /* retry? */, pParent); 3188 3162 else 3189 { 3190 /* Save machine settings: */ 3191 comMachine.SaveSettings(); 3192 fSuccess = comMachine.isOk(); 3193 3194 /* Show error message if necessary: */ 3195 if (!fSuccess) 3196 UINotificationMessage::cannotSaveMachineSettings(machine()); 3197 } 3163 fSuccess = uimachine()->saveSettings(); 3198 3164 return fSuccess; 3199 3165 } -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UISession.cpp
r98722 r98724 296 296 UINotificationMessage::cannotResumeMachine(comConsole); 297 297 } 298 return fSuccess; 299 } 300 301 bool UISession::saveSettings() 302 { 303 CMachine comMachine = machine(); 304 comMachine.SaveSettings(); 305 const bool fSuccess = comMachine.isOk(); 306 if (!fSuccess) 307 UINotificationMessage::cannotSaveMachineSettings(comMachine); 298 308 return fSuccess; 299 309 } … … 1830 1840 1831 1841 /* Save machine settings: */ 1832 machine().SaveSettings(); 1833 1834 /* Show error message if necessary: */ 1835 if (!machine().isOk()) 1836 { 1837 UINotificationMessage::cannotSaveMachineSettings(machine()); 1838 return false; 1839 } 1842 if (!saveSettings()) 1843 return false; 1840 1844 1841 1845 /* True by default: */ -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UISession.h
r98722 r98724 243 243 /** Performes VM pausing/resuming depending on @a fPause state. */ 244 244 bool setPause(bool fPause); 245 /** @} */ 246 247 /** @name Machine-data stuff. 248 ** @{ */ 249 /** Saves machine data. */ 250 bool saveSettings(); 245 251 /** @} */ 246 252
Note:
See TracChangeset
for help on using the changeset viewer.