Changeset 88740 in vbox for trunk/src/VBox
- Timestamp:
- Apr 27, 2021 4:52:17 PM (4 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/globals
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/globals/UICommon.cpp
r88678 r88740 4693 4693 void UICommon::sltHandleCommitDataRequest(QSessionManager &manager) 4694 4694 { 4695 LogRel(("GUI: UICommon: :sltHandleCommitDataRequest: Emergency shutdown initiated\n"));4695 LogRel(("GUI: UICommon: Commit data request..\n")); 4696 4696 4697 4697 /* Ask listener to commit data: */ … … 4707 4707 case UIType_RuntimeUI: 4708 4708 { 4709 // WORKAROUND: 4710 // We can't save VM state in one go, so we have to ask session manager to postpone shutdown until we done.. 4711 manager.cancel(); 4709 /* Thin clients will be able to shutdown properly, 4710 * but for fat clients: */ 4711 if (!isSeparateProcess()) 4712 { 4713 // WORKAROUND: 4714 // We can't save VM state in one go for fat clients, so we have to ask session manager to cancel shutdown. 4715 // To next major release this should be removed in any case, since there will be no fat clients after all. 4716 manager.cancel(); 4712 4717 4713 4718 #ifdef VBOX_WS_WIN 4714 // WORKAROUND: 4715 // In theory that's Qt5 who should allow us to provide postponing reason as well, but that functionality 4716 // seems missed in Windows platform plugin, so we are making that ourselves. That also implies that since 4717 // we had postponed a shutdown process, host will send us WM_QUIT to allow to properly do an application 4718 // cleanup first. That signal will cause QApplication to quit(). 4719 ShutdownBlockReasonCreateAPI((HWND)windowManager().mainWindowShown()->winId(), L"Shutdown in progress..."); 4719 // WORKAROUND: 4720 // In theory that's Qt5 who should allow us to provide canceling reason as well, but that functionality 4721 // seems to be missed in Windows platform plugin, so we are making that ourselves. 4722 ShutdownBlockReasonCreateAPI((HWND)windowManager().mainWindowShown()->winId(), L"VM is still running."); 4720 4723 #endif 4724 } 4721 4725 4722 4726 break; -
trunk/src/VBox/Frontends/VirtualBox/src/globals/UIStarter.cpp
r88664 r88740 76 76 connect(&uiCommon(), &UICommon::sigAskToCloseUI, 77 77 this, &UIStarter::sltCloseUI); 78 connect(&uiCommon(), &UICommon::sigAskToCommitData,79 this, &UIStarter::sltHandleCommitDataRequest);80 78 } 81 79 … … 87 85 disconnect(&uiCommon(), &UICommon::sigAskToCloseUI, 88 86 this, &UIStarter::sltCloseUI); 89 disconnect(&uiCommon(), &UICommon::sigAskToCommitData,90 this, &UIStarter::sltHandleCommitDataRequest);91 87 } 92 88 … … 159 155 #endif 160 156 } 161 162 void UIStarter::sltHandleCommitDataRequest()163 {164 /* Exit if UICommon is not valid: */165 if (!uiCommon().isValid())166 return;167 168 #ifdef VBOX_RUNTIME_UI169 /* Only for the case when we have this request170 * earlier than the usual cleanup started: */171 if (!UICommon::isCleaningUp())172 gpMachine->uisession()->saveState();173 #endif174 } -
trunk/src/VBox/Frontends/VirtualBox/src/globals/UIStarter.h
r88656 r88740 60 60 void sltCloseUI(); 61 61 62 /** Handles commit data request. */63 void sltHandleCommitDataRequest();64 65 62 private: 66 63
Note:
See TracChangeset
for help on using the changeset viewer.