Changeset 45165 in vbox
- Timestamp:
- Mar 25, 2013 12:26:16 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/extensions/QIDialog.cpp
r45163 r45165 35 35 } 36 36 37 void QIDialog::s howEvent(QShowEvent * /* pEvent */)37 void QIDialog::setVisible(bool fVisible) 38 38 { 39 /* Polishing: */ 40 if (m_fPolished) 41 return; 42 m_fPolished = true; 39 /* Call to base-class: */ 40 QDialog::setVisible(fVisible); 43 41 44 /* Make sure layout is polished: */ 45 adjustSize(); 46 #ifdef Q_WS_MAC 47 /* And dialog have fixed size: */ 48 setFixedSize(size()); 49 #endif /* Q_WS_MAC */ 50 51 /* Explicit centering according to our parent: */ 52 VBoxGlobal::centerWidget(this, parentWidget(), false); 42 /* Exit from the event-loop if 43 * 1. there is any and 44 * 2. we are changing our state from visible to invisible: */ 45 if (m_pEventLoop && !fVisible) 46 m_pEventLoop->exit(); 53 47 } 54 48 … … 122 116 } 123 117 124 void QIDialog::s etVisible(bool fVisible)118 void QIDialog::showEvent(QShowEvent * /* pEvent */) 125 119 { 126 /* Call to base-class: */ 127 QDialog::setVisible(fVisible); 120 /* Polishing: */ 121 if (m_fPolished) 122 return; 123 m_fPolished = true; 128 124 129 /* Exit from the event-loop if 130 * 1. there is any and 131 * 2. we are changing our state from visible to invisible: */ 132 if (m_pEventLoop && !fVisible) 133 m_pEventLoop->exit(); 125 /* Make sure layout is polished: */ 126 adjustSize(); 127 #ifdef Q_WS_MAC 128 /* And dialog have fixed size: */ 129 setFixedSize(size()); 130 #endif /* Q_WS_MAC */ 131 132 /* Explicit centering according to our parent: */ 133 VBoxGlobal::centerWidget(this, parentWidget(), false); 134 134 } 135 135
Note:
See TracChangeset
for help on using the changeset viewer.