Index: trunk/src/VBox/Frontends/VirtualBox/src/globals/UIPopupCenter.cpp
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/globals/UIPopupCenter.cpp	(revision 71488)
+++ trunk/src/VBox/Frontends/VirtualBox/src/globals/UIPopupCenter.cpp	(revision 71489)
@@ -5,5 +5,5 @@
 
 /*
- * Copyright (C) 2013-2017 Oracle Corporation
+ * Copyright (C) 2013-2018 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
@@ -21,12 +21,12 @@
 
 /* GUI includes: */
+# include "QIMessageBox.h"
+# include "VBoxGlobal.h"
+# include "UIErrorString.h"
+# include "UIExtraDataManager.h"
+# include "UIHostComboEditor.h"
+# include "UIMachineWindow.h"
 # include "UIPopupCenter.h"
 # include "UIPopupStack.h"
-# include "UIMachineWindow.h"
-# include "QIMessageBox.h"
-# include "VBoxGlobal.h"
-# include "UIHostComboEditor.h"
-# include "UIExtraDataManager.h"
-# include "UIErrorString.h"
 
 /* COM includes: */
@@ -45,6 +45,6 @@
 
 /* static */
-UIPopupCenter* UIPopupCenter::m_spInstance = 0;
-UIPopupCenter* UIPopupCenter::instance() { return m_spInstance; }
+UIPopupCenter* UIPopupCenter::s_pInstance = 0;
+UIPopupCenter* UIPopupCenter::instance() { return s_pInstance; }
 
 /* static */
@@ -52,5 +52,5 @@
 {
     /* Make sure instance is NOT created yet: */
-    if (m_spInstance)
+    if (s_pInstance)
         return;
 
@@ -58,5 +58,5 @@
     new UIPopupCenter;
     /* Prepare instance: */
-    m_spInstance->prepare();
+    s_pInstance->prepare();
 }
 
@@ -65,11 +65,11 @@
 {
     /* Make sure instance is NOT destroyed yet: */
-    if (!m_spInstance)
+    if (!s_pInstance)
         return;
 
     /* Cleanup instance: */
-    m_spInstance->cleanup();
+    s_pInstance->cleanup();
     /* Destroy instance: */
-    delete m_spInstance;
+    delete s_pInstance;
 }
 
@@ -77,5 +77,5 @@
 {
     /* Assign instance: */
-    m_spInstance = this;
+    s_pInstance = this;
 }
 
@@ -83,5 +83,5 @@
 {
     /* Unassign instance: */
-    m_spInstance = 0;
+    s_pInstance = 0;
 }
 
@@ -93,11 +93,11 @@
 {
     /* Make sure all the popup-stack types destroyed: */
-    foreach (const QString &strPopupStackTypeID, m_stackTypes.keys())
-        m_stackTypes.remove(strPopupStackTypeID);
+    foreach (const QString &strTypeID, m_stackTypes.keys())
+        m_stackTypes.remove(strTypeID);
     /* Make sure all the popup-stacks destroyed: */
-    foreach (const QString &strPopupStackID, m_stacks.keys())
-    {
-        delete m_stacks[strPopupStackID];
-        m_stacks.remove(strPopupStackID);
+    foreach (const QString &strID, m_stacks.keys())
+    {
+        delete m_stacks[strID];
+        m_stacks.remove(strID);
     }
 }
@@ -135,5 +135,5 @@
 }
 
-void UIPopupCenter::setPopupStackType(QWidget *pParent, UIPopupStackType newStackType)
+void UIPopupCenter::setPopupStackType(QWidget *pParent, UIPopupStackType enmType)
 {
     /* Make sure parent is set! */
@@ -144,8 +144,8 @@
 
     /* Looking for current popup-stack type, create if it doesn't exists: */
-    UIPopupStackType &stackType = m_stackTypes[strPopupStackID];
+    UIPopupStackType &enmCurrentType = m_stackTypes[strPopupStackID];
 
     /* Make sure stack-type has changed: */
-    if (stackType == newStackType)
+    if (enmCurrentType == enmType)
         return;
 
@@ -153,7 +153,7 @@
     LogRelFlow(("UIPopupCenter::setPopupStackType: Changing type of popup-stack with ID = '%s' from '%s' to '%s'.\n",
                 strPopupStackID.toLatin1().constData(),
-                stackType == UIPopupStackType_Separate ? "separate window" : "embedded widget",
-                newStackType == UIPopupStackType_Separate ? "separate window" : "embedded widget"));
-    stackType = newStackType;
+                enmCurrentType == UIPopupStackType_Separate ? "separate window" : "embedded widget",
+                enmType == UIPopupStackType_Separate ? "separate window" : "embedded widget"));
+    enmCurrentType = enmType;
 }
 
@@ -185,11 +185,11 @@
 }
 
-void UIPopupCenter::message(QWidget *pParent, const QString &strPopupPaneID,
+void UIPopupCenter::message(QWidget *pParent, const QString &strID,
                             const QString &strMessage, const QString &strDetails,
-                            const QString &strButtonText1 /* = QString()*/,
-                            const QString &strButtonText2 /* = QString()*/,
-                            bool fProposeAutoConfirmation /* = false*/)
-{
-    showPopupPane(pParent, strPopupPaneID,
+                            const QString &strButtonText1 /* = QString() */,
+                            const QString &strButtonText2 /* = QString() */,
+                            bool fProposeAutoConfirmation /* = false */)
+{
+    showPopupPane(pParent, strID,
                   strMessage, strDetails,
                   strButtonText1, strButtonText2,
@@ -197,15 +197,15 @@
 }
 
-void UIPopupCenter::popup(QWidget *pParent, const QString &strPopupPaneID,
+void UIPopupCenter::popup(QWidget *pParent, const QString &strID,
                           const QString &strMessage)
 {
-    message(pParent, strPopupPaneID, strMessage, QString());
-}
-
-void UIPopupCenter::alert(QWidget *pParent, const QString &strPopupPaneID,
+    message(pParent, strID, strMessage, QString());
+}
+
+void UIPopupCenter::alert(QWidget *pParent, const QString &strID,
                           const QString &strMessage,
-                          bool fProposeAutoConfirmation /* = false*/)
-{
-    message(pParent, strPopupPaneID, strMessage, QString(),
+                          bool fProposeAutoConfirmation /* = false */)
+{
+    message(pParent, strID, strMessage, QString(),
             QApplication::translate("UIMessageCenter", "Close") /* 1st button text */,
             QString() /* 2nd button text */,
@@ -213,10 +213,10 @@
 }
 
-void UIPopupCenter::alertWithDetails(QWidget *pParent, const QString &strPopupPaneID,
+void UIPopupCenter::alertWithDetails(QWidget *pParent, const QString &strID,
                                      const QString &strMessage,
                                      const QString &strDetails,
-                                     bool fProposeAutoConfirmation /* = false*/)
-{
-    message(pParent, strPopupPaneID, strMessage, strDetails,
+                                     bool fProposeAutoConfirmation /* = false */)
+{
+    message(pParent, strID, strMessage, strDetails,
             QApplication::translate("UIMessageCenter", "Close") /* 1st button text */,
             QString() /* 2nd button text */,
@@ -224,24 +224,24 @@
 }
 
-void UIPopupCenter::question(QWidget *pParent, const QString &strPopupPaneID,
+void UIPopupCenter::question(QWidget *pParent, const QString &strID,
                              const QString &strMessage,
-                             const QString &strButtonText1 /* = QString()*/,
-                             const QString &strButtonText2 /* = QString()*/,
-                             bool fProposeAutoConfirmation /* = false*/)
-{
-    message(pParent, strPopupPaneID, strMessage, QString(),
+                             const QString &strButtonText1 /* = QString() */,
+                             const QString &strButtonText2 /* = QString() */,
+                             bool fProposeAutoConfirmation /* = false */)
+{
+    message(pParent, strID, strMessage, QString(),
             strButtonText1, strButtonText2,
             fProposeAutoConfirmation);
 }
 
-void UIPopupCenter::recall(QWidget *pParent, const QString &strPopupPaneID)
-{
-    hidePopupPane(pParent, strPopupPaneID);
-}
-
-void UIPopupCenter::showPopupPane(QWidget *pParent, const QString &strPopupPaneID,
+void UIPopupCenter::recall(QWidget *pParent, const QString &strID)
+{
+    hidePopupPane(pParent, strID);
+}
+
+void UIPopupCenter::showPopupPane(QWidget *pParent, const QString &strID,
                                   const QString &strMessage, const QString &strDetails,
-                                  QString strButtonText1 /* = QString()*/, QString strButtonText2 /* = QString()*/,
-                                  bool fProposeAutoConfirmation /* = false*/)
+                                  QString strButtonText1 /* = QString() */, QString strButtonText2 /* = QString() */,
+                                  bool fProposeAutoConfirmation /* = false */)
 {
     /* Make sure parent is set! */
@@ -273,5 +273,5 @@
     {
         const QStringList confirmedPopupList = gEDataManager->suppressedMessages();
-        if (   confirmedPopupList.contains(strPopupPaneID)
+        if (   confirmedPopupList.contains(strID)
             || confirmedPopupList.contains("allPopupPanes")
             || confirmedPopupList.contains("all") )
@@ -282,5 +282,5 @@
             else if (iButton2 & AlertButtonOption_Default)
                 iResultCode |= (iButton2 & AlertButtonMask);
-            emit sigPopupPaneDone(strPopupPaneID, iResultCode);
+            emit sigPopupPaneDone(strID, iResultCode);
             return;
         }
@@ -307,8 +307,8 @@
 
     /* If there is already popup-pane with such ID: */
-    if (pPopupStack->exists(strPopupPaneID))
+    if (pPopupStack->exists(strID))
     {
         /* Just update existing one: */
-        pPopupStack->updatePopupPane(strPopupPaneID, strMessage, strDetails);
+        pPopupStack->updatePopupPane(strID, strMessage, strDetails);
     }
     /* If there is no popup-pane with such ID: */
@@ -324,5 +324,5 @@
             buttonDescriptions[AlertButton_Cancel | AlertOption_AutoConfirmed] = QString();
         /* Create new one: */
-        pPopupStack->createPopupPane(strPopupPaneID, strMessage, strDetails, buttonDescriptions);
+        pPopupStack->createPopupPane(strID, strMessage, strDetails, buttonDescriptions);
     }
 
@@ -331,5 +331,5 @@
 }
 
-void UIPopupCenter::hidePopupPane(QWidget *pParent, const QString &strPopupPaneID)
+void UIPopupCenter::hidePopupPane(QWidget *pParent, const QString &strID)
 {
     /* Make sure parent is set! */
@@ -343,25 +343,25 @@
     /* Make sure corresponding popup-pane *exists*: */
     UIPopupStack *pPopupStack = m_stacks[strPopupStackID];
-    if (!pPopupStack->exists(strPopupPaneID))
+    if (!pPopupStack->exists(strID))
         return;
 
     /* Recall corresponding popup-pane: */
-    pPopupStack->recallPopupPane(strPopupPaneID);
-}
-
-void UIPopupCenter::sltPopupPaneDone(QString strPopupPaneID, int iResultCode)
+    pPopupStack->recallPopupPane(strID);
+}
+
+void UIPopupCenter::sltPopupPaneDone(QString strID, int iResultCode)
 {
     /* Remember auto-confirmation fact (if necessary): */
     if (iResultCode & AlertOption_AutoConfirmed)
-        gEDataManager->setSuppressedMessages(gEDataManager->suppressedMessages() << strPopupPaneID);
+        gEDataManager->setSuppressedMessages(gEDataManager->suppressedMessages() << strID);
 
     /* Notify listeners: */
-    emit sigPopupPaneDone(strPopupPaneID, iResultCode);
-}
-
-void UIPopupCenter::sltRemovePopupStack(QString strPopupStackID)
+    emit sigPopupPaneDone(strID, iResultCode);
+}
+
+void UIPopupCenter::sltRemovePopupStack(QString strID)
 {
     /* Make sure corresponding popup-stack *exists*: */
-    if (!m_stacks.contains(strPopupStackID))
+    if (!m_stacks.contains(strID))
     {
         AssertMsgFailed(("Popup-stack already destroyed!\n"));
@@ -371,6 +371,6 @@
     /* Delete popup-stack asyncronously.
      * To avoid issues with events which already posted: */
-    UIPopupStack *pPopupStack = m_stacks[strPopupStackID];
-    m_stacks.remove(strPopupStackID);
+    UIPopupStack *pPopupStack = m_stacks[strID];
+    m_stacks.remove(strID);
     pPopupStack->deleteLater();
 }
@@ -391,5 +391,5 @@
 
 /* static */
-void UIPopupCenter::assignPopupStackParent(UIPopupStack *pPopupStack, QWidget *pParent, UIPopupStackType stackType)
+void UIPopupCenter::assignPopupStackParent(UIPopupStack *pPopupStack, QWidget *pParent, UIPopupStackType enmStackType)
 {
     /* Make sure parent is set! */
@@ -400,5 +400,5 @@
 
     /* Assign parent depending on passed *stack* type: */
-    switch (stackType)
+    switch (enmStackType)
     {
         case UIPopupStackType_Embedded:
Index: trunk/src/VBox/Frontends/VirtualBox/src/globals/UIPopupCenter.h
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/globals/UIPopupCenter.h	(revision 71488)
+++ trunk/src/VBox/Frontends/VirtualBox/src/globals/UIPopupCenter.h	(revision 71489)
@@ -5,5 +5,5 @@
 
 /*
- * Copyright (C) 2013-2017 Oracle Corporation
+ * Copyright (C) 2013-2018 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
@@ -16,6 +16,6 @@
  */
 
-#ifndef __UIPopupCenter_h__
-#define __UIPopupCenter_h__
+#ifndef ___UIPopupCenter_h___
+#define ___UIPopupCenter_h___
 
 /* Qt includes: */
@@ -39,5 +39,6 @@
 class CVRDEServer;
 
-/* Popup-stack types: */
+
+/** Popup-stack types. */
 enum UIPopupStackType
 {
@@ -46,5 +47,5 @@
 };
 
-/* Popup-stack orientations: */
+/** Popup-stack orientations. */
 enum UIPopupStackOrientation
 {
@@ -53,5 +54,7 @@
 };
 
-/* Popup-center singleton: */
+
+/** Singleton QObject extension
+  * providing GUI with various popup messages. */
 class UIPopupCenter: public QObject
 {
@@ -60,23 +63,33 @@
 signals:
 
-    /* Notifier: Popup-pane stuff: */
-    void sigPopupPaneDone(QString strPopupPaneID, int iResultCode);
+    /** Notifies about popup-pane with @a strID is closed with @a iResultCode. */
+    void sigPopupPaneDone(QString strID, int iResultCode);
 
 public:
 
-    /* Static API: Create/destroy stuff: */
+    /** Creates popup-center singleton. */
     static void create();
+    /** Destroys message-center singleton. */
     static void destroy();
 
-    /* API: Popup-stack stuff: */
+    /** Shows popup-stack for @a pParent. */
     void showPopupStack(QWidget *pParent);
+    /** Hides popup-stack for @a pParent. */
     void hidePopupStack(QWidget *pParent);
-    void setPopupStackType(QWidget *pParent, UIPopupStackType newStackType);
-    void setPopupStackOrientation(QWidget *pParent, UIPopupStackOrientation newStackOrientation);
-
-    /* API: Main message function.
-     * Provides up to two buttons.
-     * Its interface, do NOT use it directly! */
-    void message(QWidget *pParent, const QString &strPopupPaneID,
+
+    /** Defines popup-stack @a enmType for @a pParent. */
+    void setPopupStackType(QWidget *pParent, UIPopupStackType enmType);
+    /** Defines popup-stack @a enmOrientation for @a pParent. */
+    void setPopupStackOrientation(QWidget *pParent, UIPopupStackOrientation enmOrientation);
+
+    /** Shows a general type of 'Message'.
+      * @param  pParent                   Brings the popup-pane parent.
+      * @param  strID                     Brings the popup-pane ID.
+      * @param  strMessage                Brings the message.
+      * @param  strDetails                Brings the details.
+      * @param  strButtonText1            Brings the button 1 text.
+      * @param  strButtonText2            Brings the button 2 text.
+      * @param  fProposeAutoConfirmation  Brings whether auto-confirmation if possible. */
+    void message(QWidget *pParent, const QString &strID,
                  const QString &strMessage, const QString &strDetails,
                  const QString &strButtonText1 = QString(),
@@ -84,25 +97,42 @@
                  bool fProposeAutoConfirmation = false);
 
-    /* API: Wrapper to 'message' function.
-     * Omits details, provides no buttons: */
-    void popup(QWidget *pParent, const QString &strPopupPaneID,
+    /** Shows 'Popup' type of 'Message'.
+      * Omits details, provides no buttons.
+      * @param  pParent                   Brings the popup-pane parent.
+      * @param  strID                     Brings the popup-pane ID.
+      * @param  strMessage                Brings the message. */
+    void popup(QWidget *pParent, const QString &strID,
                const QString &strMessage);
 
-    /* API: Wrapper to 'message' function.
-     * Omits details, provides one button: */
-    void alert(QWidget *pParent, const QString &strPopupPaneID,
+    /** Shows 'Alert' type of 'Message'.
+      * Omits details, provides one button.
+      * @param  pParent                   Brings the popup-pane parent.
+      * @param  strID                     Brings the popup-pane ID.
+      * @param  strMessage                Brings the message.
+      * @param  fProposeAutoConfirmation  Brings whether auto-confirmation if possible. */
+    void alert(QWidget *pParent, const QString &strID,
                const QString &strMessage,
                bool fProposeAutoConfirmation = false);
 
-    /* API: Wrapper to 'message' function.
-     * Provides one button: */
-    void alertWithDetails(QWidget *pParent, const QString &strPopupPaneID,
-                          const QString &strMessage,
-                          const QString &strDetails,
+    /** Shows 'Alert with Details' type of 'Message'.
+      * Provides one button.
+      * @param  pParent                   Brings the popup-pane parent.
+      * @param  strID                     Brings the popup-pane ID.
+      * @param  strMessage                Brings the message.
+      * @param  strDetails                Brings the details.
+      * @param  fProposeAutoConfirmation  Brings whether auto-confirmation if possible. */
+    void alertWithDetails(QWidget *pParent, const QString &strID,
+                          const QString &strMessage, const QString &strDetails,
                           bool fProposeAutoConfirmation = false);
 
-    /* API: Wrapper to 'message' function.
-     * Omits details, provides up to two buttons: */
-    void question(QWidget *pParent, const QString &strPopupPaneID,
+    /** Shows 'Question' type of 'Message'.
+      * Omits details, provides up to two buttons.
+      * @param  pParent                   Brings the popup-pane parent.
+      * @param  strID                     Brings the popup-pane ID.
+      * @param  strMessage                Brings the message.
+      * @param  strButtonText1            Brings the button 1 text.
+      * @param  strButtonText2            Brings the button 2 text.
+      * @param  fProposeAutoConfirmation  Brings whether auto-confirmation if possible. */
+    void question(QWidget *pParent, const QString &strID,
                   const QString &strMessage,
                   const QString &strButtonText1 = QString(),
@@ -110,7 +140,6 @@
                   bool fProposeAutoConfirmation = false);
 
-    /* API: Recall function,
-     * Close corresponding popup of passed parent: */
-    void recall(QWidget *pParent, const QString &strPopupPaneID);
+    /** Recalls popup with @a strID of passed @a pParent. */
+    void recall(QWidget *pParent, const QString &strID);
 
     /* API: Runtime UI stuff: */
@@ -148,45 +177,65 @@
 private slots:
 
-    /* Handler: Popup-pane stuff: */
-    void sltPopupPaneDone(QString strPopupPaneID, int iResultCode);
-
-    /* Handler: Popup-stack stuff: */
-    void sltRemovePopupStack(QString strPopupStackID);
+    /** Handles request to close popup-pane with @a strID and @a iResultCode. */
+    void sltPopupPaneDone(QString strID, int iResultCode);
+
+    /** Handles request to remove popup-stack with @a strID. */
+    void sltRemovePopupStack(QString strID);
 
 private:
 
-    /* Constructor/destructor: */
+    /** Constructs popup-center. */
     UIPopupCenter();
+    /** Destructs popup-center. */
     ~UIPopupCenter();
 
-    /* Helpers: Prepare/cleanup stuff: */
+    /** Prepares all. */
     void prepare();
+    /** Cleanups all. */
     void cleanup();
 
-    /* Helpers: Popup-pane stuff: */
-    void showPopupPane(QWidget *pParent, const QString &strPopupPaneID,
+    /** Shows popup-pane.
+      * @param  pParent                   Brings the popup-pane parent.
+      * @param  strID                     Brings the popup-pane ID.
+      * @param  strMessage                Brings the message.
+      * @param  strDetails                Brings the details.
+      * @param  strButtonText1            Brings the button 1 text.
+      * @param  strButtonText2            Brings the button 2 text.
+      * @param  fProposeAutoConfirmation  Brings whether auto-confirmation if possible. */
+    void showPopupPane(QWidget *pParent, const QString &strID,
                        const QString &strMessage, const QString &strDetails,
                        QString strButtonText1 = QString(), QString strButtonText2 = QString(),
                        bool fProposeAutoConfirmation = false);
-    void hidePopupPane(QWidget *pParent, const QString &strPopupPaneID);
-
-    /* Static helper: Popup-stack stuff: */
+    /** Hides popup-pane.
+      * @param  pParent  Brings the popup-pane parent.
+      * @param  strID    Brings the popup-pane ID. */
+    void hidePopupPane(QWidget *pParent, const QString &strID);
+
+    /** Returns popup-stack ID for passed @a pParent. */
     static QString popupStackID(QWidget *pParent);
-    static void assignPopupStackParent(UIPopupStack *pPopupStack, QWidget *pParent, UIPopupStackType stackType);
+    /** Assigns @a pPopupStack @a pParent of passed @a enmStackType. */
+    static void assignPopupStackParent(UIPopupStack *pPopupStack, QWidget *pParent, UIPopupStackType enmStackType);
+    /** Unassigns @a pPopupStack @a pParent. */
     static void unassignPopupStackParent(UIPopupStack *pPopupStack, QWidget *pParent);
 
-    /* Variables: Popup-stack stuff: */
-    QMap<QString, UIPopupStackType> m_stackTypes;
-    QMap<QString, UIPopupStackOrientation> m_stackOrientations;
-    QMap<QString, QPointer<UIPopupStack> > m_stacks;
-
-    /* Instance stuff: */
-    static UIPopupCenter* m_spInstance;
-    static UIPopupCenter* instance();
-    friend UIPopupCenter& popupCenter();
+    /** Holds the popup-stack type on per stack ID basis. */
+    QMap<QString, UIPopupStackType>         m_stackTypes;
+    /** Holds the popup-stack orientations on per stack ID basis. */
+    QMap<QString, UIPopupStackOrientation>  m_stackOrientations;
+    /** Holds the popup-stacks on per stack ID basis. */
+    QMap<QString, QPointer<UIPopupStack> >  m_stacks;
+
+    /** Holds the singleton message-center instance. */
+    static UIPopupCenter *s_pInstance;
+    /** Returns the singleton message-center instance. */
+    static UIPopupCenter *instance();
+    /** Allows for shortcut access. */
+    friend UIPopupCenter &popupCenter();
 };
 
-/* Shortcut to the static UIPopupCenter::instance() method: */
-inline UIPopupCenter& popupCenter() { return *UIPopupCenter::instance(); }
-
-#endif /* __UIPopupCenter_h__ */
+/** Singleton Popup Center 'official' name. */
+inline UIPopupCenter &popupCenter() { return *UIPopupCenter::instance(); }
+
+
+#endif /* !___UIPopupCenter_h___ */
+
