Changeset 45166 in vbox
- Timestamp:
- Mar 25, 2013 12:31:19 PM (12 years ago)
- svn:sync-xref-src-repo-rev:
- 84489
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/extensions/QIDialog.cpp
r45165 r45166 52 52 setResult(QDialog::Rejected); 53 53 54 /* Should we delete ourself on close in theory? */ 54 55 bool fWasDeleteOnClose = testAttribute(Qt::WA_DeleteOnClose); 55 56 setAttribute(Qt::WA_DeleteOnClose, false); 57 56 58 #if defined(Q_WS_MAC) && QT_VERSION >= 0x040500 57 59 /* After 4.5 Qt changed the behavior of Sheets for the window/application … … 73 75 setAttribute(Qt::WA_ShowModal, true); 74 76 75 /* Create a local event-loop: */76 QEventLoop eventLoop;77 m_pEventLoop = &eventLoop;78 79 77 /* Show ourself if requested: */ 80 78 if (fShow) 81 79 show(); 82 80 83 /* Guard ourself for the case 84 * we destroyed ourself in our event-loop: */ 85 QPointer<QIDialog> guard = this; 81 /* Create a local event-loop: */ 82 { 83 QEventLoop eventLoop; 84 m_pEventLoop = &eventLoop; 86 85 87 /* Start the blocking event-loop: */ 88 eventLoop.exec(); 86 /* Guard ourself for the case 87 * we destroyed ourself in our event-loop: */ 88 QPointer<QIDialog> guard = this; 89 89 90 /* Are we still valid? */ 91 if (guard.isNull()) 92 return QDialog::Rejected; 90 /* Start the blocking event-loop: */ 91 eventLoop.exec(); 93 92 94 m_pEventLoop = 0; 93 /* Are we still valid? */ 94 if (guard.isNull()) 95 return QDialog::Rejected; 96 97 m_pEventLoop = 0; 98 } 95 99 96 100 /* Save the result-code early (we can delete ourself on close): */ … … 105 109 } 106 110 #endif /* defined(Q_WS_MAC) && QT_VERSION >= 0x040500 */ 111 /* Set the old show modal attribute: */ 112 setAttribute (Qt::WA_ShowModal, wasShowModal); 107 113 108 /* Set the old show modal attribute */109 setAttribute (Qt::WA_ShowModal, wasShowModal);110 114 /* Delete ourself if we should do that on close: */ 111 115 if (fWasDeleteOnClose)
Note:
See TracChangeset
for help on using the changeset viewer.