- Timestamp:
- May 28, 2018 4:49:10 PM (7 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/main.cpp
r72360 r72363 481 481 break; 482 482 483 /* For Runtime UI: */ 484 if (vboxGlobal().isVMConsoleProcess()) 485 { 486 /* Prevent application from exiting when all window(s) closed: */ 487 qApp->setQuitOnLastWindowClosed(false); 488 } 483 // WORKAROUND: 484 // Initially we wanted to make that workaround for Runtime UI only, 485 // because only there we had a strict handling for proper application quit 486 // procedure. But it appeared on X11 (as usually due to an async nature) there 487 // can happen situations that Qt application is checking whether at least one 488 // window is already shown and if not - exits prematurely _before_ it is actually 489 // shown. That can happen for example if window is not yet shown because blocked 490 // by startup error message-box which is not treated as real window by some 491 // reason. So we are making application exit manual everywhere. 492 qApp->setQuitOnLastWindowClosed(false); 489 493 490 494 /* Request to Start UI _after_ QApplication executed: */ -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachine.cpp
r71374 r72363 142 142 } 143 143 144 void UIMachine::closeRuntimeUI() 145 { 146 /* Quit application: */ 147 QApplication::quit(); 148 } 149 144 150 void UIMachine::sltChangeVisualState(UIVisualStateType visualState) 145 151 { … … 304 310 /* Cleanup session UI: */ 305 311 cleanupSession(); 306 307 /* Quit application: */308 QApplication::quit();309 312 } 310 313 -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachine.h
r69500 r72363 71 71 72 72 /** Close Runtime UI. */ 73 void closeRuntimeUI() { destroy(); }73 void closeRuntimeUI(); 74 74 75 75 private slots: -
trunk/src/VBox/Frontends/VirtualBox/src/selector/UISelectorWindow.cpp
r72257 r72363 1417 1417 #endif /* VBOX_WS_MAC */ 1418 1418 1419 void UISelectorWindow::closeEvent(QCloseEvent *pEvent) 1420 { 1421 /* Call to base-class: */ 1422 QIWithRetranslateUI<QIMainWindow>::closeEvent(pEvent); 1423 1424 /* Quit application: */ 1425 QApplication::quit(); 1426 } 1427 1419 1428 void UISelectorWindow::prepare() 1420 1429 { -
trunk/src/VBox/Frontends/VirtualBox/src/selector/UISelectorWindow.h
r71644 r72363 224 224 * @{ */ 225 225 /** Handles translation event. */ 226 virtual void retranslateUi() ;227 228 /** Handles any Qt@a pEvent. */229 virtual bool event(QEvent *pEvent) ;230 /** Handles Qtshow @a pEvent. */231 virtual void showEvent(QShowEvent *pEvent) ;232 /** Handles first Qtshow @a pEvent. */233 virtual void polishEvent(QShowEvent *pEvent) ;226 virtual void retranslateUi() /* override */; 227 228 /** Handles any @a pEvent. */ 229 virtual bool event(QEvent *pEvent) /* override */; 230 /** Handles show @a pEvent. */ 231 virtual void showEvent(QShowEvent *pEvent) /* override */; 232 /** Handles first show @a pEvent. */ 233 virtual void polishEvent(QShowEvent *pEvent) /* override */; 234 234 #ifdef VBOX_WS_MAC 235 /** Mac OS X: Preprocesses any Qt @a pEvent for passed @a pObject. */ 236 virtual bool eventFilter(QObject *pObject, QEvent *pEvent); 237 #endif /* VBOX_WS_MAC */ 235 /** Mac OS X: Preprocesses any @a pEvent for passed @a pObject. */ 236 virtual bool eventFilter(QObject *pObject, QEvent *pEvent) /* override */; 237 #endif 238 /** Handles close @a pEvent. */ 239 virtual void closeEvent(QCloseEvent *pEvent) /* override */; 238 240 /** @} */ 239 241
Note:
See TracChangeset
for help on using the changeset viewer.