Changeset 47612 in vbox
- Timestamp:
- Aug 8, 2013 12:35:01 PM (11 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/globals/UIModalWindowManager.cpp
r45452 r47612 23 23 #include "UINetworkManager.h" 24 24 #include "UISelectorWindow.h" 25 #include "UIProgressDialog.h" 25 26 #include "VBoxGlobal.h" 26 27 … … 126 127 { 127 128 /* Return the 'top' of the iterated-window-stack as the result: */ 128 return iteratedWindowStack.last(); 129 QWidget *pTopWindow = iteratedWindowStack.last(); 130 preprocessRealParent(pTopWindow); 131 return pTopWindow; 129 132 } 130 133 } … … 133 136 /* If we unable to found the possible-parent-window among all ours, 134 137 * we have to add it as the new-window-stack only element: */ 135 QList<QWidget*> newWindowStack(QList<QWidget*>() << pTopLevelWindow); 136 m_windows << newWindowStack; 138 registerNewParent(pTopLevelWindow); 137 139 /* And return as the result: */ 138 140 return pTopLevelWindow; … … 292 294 } 293 295 296 /* static */ 297 void UIModalWindowManager::preprocessRealParent(QWidget *pParent) 298 { 299 /* Progress dialog can be hidden while we are trying to use it as top-most modal parent, 300 * We should show it in such cases because else on MacOS X there will be a problem. */ 301 if (UIProgressDialog *pProgressDialog = qobject_cast<UIProgressDialog*>(pParent)) 302 pProgressDialog->show(); 303 } 304 -
trunk/src/VBox/Frontends/VirtualBox/src/globals/UIModalWindowManager.h
r45452 r47612 64 64 bool contains(QWidget *pParentWindow, bool fAsTheTopOfStack = false); 65 65 66 /* Static helper: Access stuff: */ 67 static void preprocessRealParent(QWidget *pParent); 68 66 69 /* Variables: */ 67 70 QList<QList<QWidget*> > m_windows; -
trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIProgressDialog.cpp
r45432 r47612 56 56 { 57 57 /* Setup dialog: */ 58 setModal(true);59 58 setWindowTitle(QString("%1: %2").arg(strTitle, m_progress.GetDescription())); 60 59 setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed); … … 125 124 /* The progress dialog will be shown automatically after 126 125 * the duration is over if progress is not finished yet. */ 127 QTimer::singleShot(cMinDuration, this, SLOT(s ltShowDialog()));126 QTimer::singleShot(cMinDuration, this, SLOT(showDialog())); 128 127 } 129 128 … … 178 177 } 179 178 return Rejected; 179 } 180 181 void UIProgressDialog::show() 182 { 183 /* We should not show progress-dialog 184 * if it was already finalized but not yet closed. 185 * This could happens in case of some other 186 * modal dialog prevents our event-loop from 187 * being exit overlapping 'this'. */ 188 if (!m_fEnded) 189 QIDialog::show(); 180 190 } 181 191 … … 307 317 } 308 318 309 void UIProgressDialog::sltShowDialog()310 {311 /* We should not show progress-dialog312 * if it was already finalized but not yet closed.313 * This could happens in case of some other314 * modal dialog prevents our event-loop from315 * being exit overlapping 'this'. */316 if (!m_fEnded)317 show();318 }319 320 319 void UIProgressDialog::sltCancelOperation() 321 320 { -
trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIProgressDialog.h
r45193 r47612 57 57 int run(int aRefreshInterval); 58 58 59 public slots: 60 61 /* Handler: Show stuff: */ 62 void show(); 63 59 64 protected: 60 65 … … 71 76 private slots: 72 77 73 /* Handlers: */ 74 void sltShowDialog(); 78 /* Handler: Cancel stuff: */ 75 79 void sltCancelOperation(); 76 80
Note:
See TracChangeset
for help on using the changeset viewer.