Changeset 10227
- Timestamp:
- 07/04/08 15:09:29 (6 months ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/src/VBox/Frontends/VirtualBox4/src/QIMainDialog.cpp
r10157 r10227 52 52 bool deleteOnClose = testAttribute (Qt::WA_DeleteOnClose); 53 53 setAttribute (Qt::WA_DeleteOnClose, false); 54 bool wasShowModal = testAttribute (Qt::WA_ShowModal); 55 setAttribute (Qt::WA_ShowModal, true); 54 56 55 57 /* Create a local event loop */ … … 67 69 return QDialog::Rejected; 68 70 QDialog::DialogCode res = result(); 71 /* Set the old show modal attribute */ 72 setAttribute (Qt::WA_ShowModal, wasShowModal); 69 73 /* Delete us in the case we should do so on close */ 70 74 if (deleteOnClose) trunk/src/VBox/Frontends/VirtualBox4/src/VBoxSelectorWnd.cpp
r10167 r10227 752 752 void VBoxSelectorWnd::fileExit() 753 753 { 754 /* We have to check if there are any open windows beside this mainwindow 755 * (e.g. VDM) and if so close them. Note that the default behavior is 756 * different to Qt3 where a *mainWidget* exists & if this going to close 757 * all other windows are closed automatically. We do the same below. */ 758 foreach (QWidget *widget, QApplication::topLevelWidgets()) 759 { 760 if (widget->isVisible() && 761 widget != this) 762 widget->close(); 763 } 764 /* We close this widget last. */ 754 765 close(); 755 766 }

