Index: /trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIProgressDialog.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIProgressDialog.cpp	(revision 55695)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIProgressDialog.cpp	(revision 55696)
@@ -133,4 +133,12 @@
 }
 
+UIProgressDialog::~UIProgressDialog()
+{
+    /* Wait for CProgress to complete: */
+    m_progress.WaitForCompletion(-1);
+    /* Call the timer event handling delegate: */
+    handleTimerEvent();
+}
+
 void UIProgressDialog::retranslateUi()
 {
@@ -202,5 +210,25 @@
 }
 
-void UIProgressDialog::timerEvent(QTimerEvent* /* pEvent */)
+void UIProgressDialog::timerEvent(QTimerEvent*)
+{
+    /* Call the timer event handling delegate: */
+    handleTimerEvent();
+}
+
+void UIProgressDialog::closeEvent(QCloseEvent *pEvent)
+{
+    if (m_fCancelEnabled)
+        sltCancelOperation();
+    else
+        pEvent->ignore();
+}
+
+void UIProgressDialog::sltCancelOperation()
+{
+    m_pCancelBtn->setEnabled(false);
+    m_progress.Cancel();
+}
+
+void UIProgressDialog::handleTimerEvent()
 {
     /* We should hide progress-dialog
@@ -315,18 +343,4 @@
 }
 
-void UIProgressDialog::closeEvent(QCloseEvent *pEvent)
-{
-    if (m_fCancelEnabled)
-        sltCancelOperation();
-    else
-        pEvent->ignore();
-}
-
-void UIProgressDialog::sltCancelOperation()
-{
-    m_pCancelBtn->setEnabled(false);
-    m_progress.Cancel();
-}
-
 
 UIProgress::UIProgress(CProgress &progress, QObject *pParent /* = 0 */)
Index: /trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIProgressDialog.h
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIProgressDialog.h	(revision 55695)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIProgressDialog.h	(revision 55696)
@@ -49,7 +49,9 @@
 public:
 
-    /* Constructor/destructor: */
+    /** Constructor. */
     UIProgressDialog(CProgress &progress, const QString &strTitle,
                      QPixmap *pImage = 0, int cMinDuration = 2000, QWidget *pParent = 0);
+    /** Destructor. */
+    ~UIProgressDialog();
 
     /* API: Run stuff: */
@@ -79,4 +81,7 @@
 
 private:
+
+    /** Timer event handling delegate. */
+    void handleTimerEvent();
 
     /* Variables: */
