Changeset 10888 in vbox for trunk/src/VBox/Frontends/VirtualBox4
- Timestamp:
- Jul 25, 2008 12:31:53 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox4/src/VBoxConsoleWnd.cpp
r10885 r10888 3405 3405 void VBoxConsoleWnd::tryClose() 3406 3406 { 3407 //#warning "port me"3408 3407 /* First close any open modal & popup widgets. Use a single shot with 3409 3408 * timeout 0 to allow the widgets to cleany close and test then again. If 3410 3409 * all open widgets are closed destroy ourself. */ 3411 QWidget *widget = QApplication::activeModalWidget(); 3410 3411 /// #warning "port me": 3412 /// @todo (r=dsen) we have to test this on windows 3413 3414 QWidget *widget = QApplication::activeModalWidget() ? 3415 QApplication::activeModalWidget() : 3416 QApplication::activePopupWidget() ? 3417 QApplication::activePopupWidget() : 0; 3412 3418 if (widget) 3413 3419 { … … 3416 3422 } 3417 3423 else 3418 { 3419 widget = QApplication::activePopupWidget(); 3420 if (widget) 3421 { 3422 widget->close(); 3423 QTimer::singleShot (0, this, SLOT (tryClose())); 3424 } 3425 else 3426 close(); 3427 } 3428 3429 /* We have this to test on Windows or maybe I forgot something, so we keep 3430 * this as a reference: */ 3431 // LogFlowFunc (("eventLoopLevel=%d\n", qApp->eventLoop()->loopLevel())); 3432 // 3433 // if (qApp->eventLoop()->loopLevel() > 1) 3434 // { 3435 // if (QApplication::activeModalWidget()) 3436 // QApplication::activeModalWidget()->close(); 3437 // else if (QApplication::activePopupWidget()) 3438 // QApplication::activePopupWidget()->close(); 3439 // else 3440 // { 3441 /// @todo (r=dmik) in general, the following is not that correct 3442 // because some custom modal event loop may not expect to be 3443 // exited externally (e.g., it might want to set some internal 3444 // flags before calling exitLoop()). The alternative is to do 3445 // nothing but wait keeping to post singleShot timers. 3446 // qApp->eventLoop()->exitLoop(); 3447 // } 3448 // 3449 // QTimer::singleShot (0, this, SLOT (tryClose())); 3450 // } 3451 // else 3452 // close(); 3424 close(); 3453 3425 } 3454 3426
Note:
See TracChangeset
for help on using the changeset viewer.