Changeset 77179 in vbox for trunk/src/VBox
- Timestamp:
- Feb 6, 2019 3:35:57 PM (6 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/extensions
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/extensions/QIMainDialog.cpp
r76606 r77179 42 42 , m_fIsAutoCentering(fIsAutoCentering) 43 43 , m_fPolished(false) 44 , m_ enmResult(QDialog::Rejected)44 , m_iResult(QDialog::Rejected) 45 45 { 46 46 /* Install event-filter: */ … … 48 48 } 49 49 50 QDialog::DialogCodeQIMainDialog::exec(bool fApplicationModal /* = true */)50 int QIMainDialog::exec(bool fApplicationModal /* = true */) 51 51 { 52 52 /* Check for the recursive run: */ … … 89 89 90 90 /* Save the result code early (we can delete ourself on close): */ 91 const QDialog::DialogCode enmResultCode = result();91 const int iResultCode = result(); 92 92 93 93 /* Return old modality: */ … … 101 101 102 102 /* Return the result code: */ 103 return enmResultCode;103 return iResultCode; 104 104 } 105 105 … … 325 325 } 326 326 327 void QIMainDialog::done( QDialog::DialogCode enmResult)327 void QIMainDialog::done(int iResult) 328 328 { 329 329 /* Set the final result: */ 330 setResult( enmResult);330 setResult(iResult); 331 331 /* Hide: */ 332 332 hide(); -
trunk/src/VBox/Frontends/VirtualBox/src/extensions/QIMainDialog.h
r76581 r77179 49 49 50 50 /** Returns the dialog's result code. */ 51 QDialog::DialogCode result() const { return m_enmResult; }51 int result() const { return m_iResult; } 52 52 53 53 /** Executes the dialog, launching local event-loop. 54 54 * @param fApplicationModal defines whether this dialog should be modal to application or window. */ 55 QDialog::DialogCodeexec(bool fApplicationModal = true);55 int exec(bool fApplicationModal = true); 56 56 57 57 /** Returns dialog's default button. */ … … 93 93 protected slots: 94 94 95 /** Sets the modal dialog's result code to @a enmResult. */96 void setResult( QDialog::DialogCode enmResult) { m_enmResult = enmResult; }95 /** Sets the modal dialog's result code to @a iResult. */ 96 void setResult(int iResult) { m_iResult = iResult; } 97 97 98 /** Closes the modal dialog and sets its result code to @a enmResult.98 /** Closes the modal dialog and sets its result code to @a iResult. 99 99 * If this dialog is shown with exec(), done() causes the local 100 * event-loop to finish, and exec() to return @a enmResult. */101 virtual void done( QDialog::DialogCode enmResult);100 * event-loop to finish, and exec() to return @a iResult. */ 101 virtual void done(int iResult); 102 102 /** Hides the modal dialog and sets the result code to Accepted. */ 103 103 virtual void accept() { done(QDialog::Accepted); } … … 113 113 114 114 /** Holds modal dialog's result code. */ 115 QDialog::DialogCode m_enmResult;115 int m_iResult; 116 116 /** Holds modal dialog's event-loop. */ 117 117 QPointer<QEventLoop> m_pEventLoop;
Note:
See TracChangeset
for help on using the changeset viewer.