Index: trunk/src/VBox/Frontends/VirtualBox/src/extensions/QIMessageBox.cpp
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/extensions/QIMessageBox.cpp	(revision 45296)
+++ trunk/src/VBox/Frontends/VirtualBox/src/extensions/QIMessageBox.cpp	(revision 45297)
@@ -40,31 +40,16 @@
 #endif /* Q_WS_MAC */
 
-/** @class QIMessageBox
- *
- *  The QIMessageBox class is a message box similar to QMessageBox.
- *  It partly implements the QMessageBox interface and adds some enhanced
- *  functionality.
- */
-
-/**
- *  See QMessageBox for details.
- */
-QIMessageBox::QIMessageBox (const QString &aCaption, const QString &aText,
-                            AlertIconType aIcon, int aButton0, int aButton1, int aButton2,
-                            QWidget *aParent, const char *aName, bool aModal)
-    : QIDialog (aParent)
-    , mText (aText)
-    , mDetailsIndex (-1)
-    , mWasDone (false)
-    , mWasPolished (false)
-{
-    setWindowTitle (aCaption);
-    /* Necessary to later find some of the message boxes */
-    setObjectName (aName);
-    setModal (aModal);
-
-    mButton0 = aButton0;
-    mButton1 = aButton1;
-    mButton2 = aButton2;
+QIMessageBox::QIMessageBox(const QString &strCaption, const QString &strMessage, AlertIconType icon,
+                           int iButton1 /*= 0*/, int iButton2 /*= 0*/, int iButton3 /*= 0*/, QWidget *pParent /*= 0*/)
+    : QIDialog(pParent)
+    , mButton1(iButton1)
+    , mButton2(iButton2)
+    , mButton3(iButton3)
+    , m_strMessage(strMessage)
+    , m_iDetailsIndex(-1)
+    , m_fDone(false)
+{
+    /* Set alert caption: */
+    setWindowTitle(strCaption);
 
     QVBoxLayout *layout = new QVBoxLayout (this);
@@ -85,5 +70,5 @@
 
     mIconLabel = new QLabel();
-    mIconLabel->setPixmap (standardPixmap (aIcon));
+    mIconLabel->setPixmap (standardPixmap (icon));
     mIconLabel->setSizePolicy (QSizePolicy::Fixed, QSizePolicy::Minimum);
     mIconLabel->setAlignment (Qt::AlignHCenter | Qt::AlignTop);
@@ -95,5 +80,5 @@
     hLayout->addLayout (messageVBoxLayout);
 
-    mTextLabel = new QILabel (aText);
+    mTextLabel = new QILabel (m_strMessage);
     mTextLabel->setAlignment (Qt::AlignLeft | Qt::AlignTop);
     mTextLabel->setWordWrap (true);
@@ -144,11 +129,11 @@
     mButtonEsc = 0;
 
-    mButton0PB = createButton (aButton0);
+    mButton0PB = createButton (iButton1);
     if (mButton0PB)
         connect (mButton0PB, SIGNAL (clicked()), SLOT (done0()));
-    mButton1PB = createButton (aButton1);
+    mButton1PB = createButton (iButton2);
     if (mButton1PB)
         connect (mButton1PB, SIGNAL (clicked()), SLOT (done1()));
-    mButton2PB = createButton (aButton2);
+    mButton2PB = createButton (iButton3);
     if (mButton2PB)
         connect (mButton2PB, SIGNAL (clicked()), SLOT (done2()));
@@ -156,5 +141,5 @@
     /* If this is an error message add an "Copy to clipboard" button for easier
      * bug reports. */
-    if (aIcon == AlertIconType_Critical)
+    if (icon == AlertIconType_Critical)
     {
         QPushButton *pCopyButton = createButton(AlertButton_Copy);
@@ -312,5 +297,5 @@
 
     mDetailsSplitter->setMultiPaging (mDetailsList.size() > 1);
-    mDetailsIndex = 0;
+    m_iDetailsIndex = 0;
     refreshDetails();
 }
@@ -350,5 +335,5 @@
 void QIMessageBox::closeEvent (QCloseEvent *e)
 {
-    if (mWasDone)
+    if (m_fDone)
         e->accept();
     else
@@ -356,18 +341,19 @@
 }
 
-void QIMessageBox::showEvent (QShowEvent *e)
-{
-    if (!mWasPolished)
-    {
-        /* Polishing sub-widgets */
-        resize (minimumSizeHint());
-        mTextLabel->useSizeHintForWidth (mTextLabel->width());
-        mTextLabel->updateGeometry();
-        setFixedSize(size());
-        mDetailsSplitter->toggleWidget();
-        mWasPolished = true;
-    }
-
-    QIDialog::showEvent (e);
+void QIMessageBox::polishEvent(QShowEvent *pPolishEvent)
+{
+    /* Tune our size: */
+    resize(minimumSizeHint());
+    mTextLabel->useSizeHintForWidth(mTextLabel->width());
+    mTextLabel->updateGeometry();
+
+    /* Call to base-class: */
+    QIDialog::polishEvent(pPolishEvent);
+
+    /* Make the size fixed: */
+    setFixedSize(size());
+
+    /* Toggle details-widget: */
+    mDetailsSplitter->toggleWidget();
 }
 
@@ -375,7 +361,7 @@
 {
     /* Update message text iteself */
-    mTextLabel->setText (mText + mDetailsList [mDetailsIndex].first);
+    mTextLabel->setText (m_strMessage + mDetailsList [m_iDetailsIndex].first);
     /* Update details table */
-    mDetailsText->setText (mDetailsList [mDetailsIndex].second);
+    mDetailsText->setText (mDetailsList [m_iDetailsIndex].second);
     setDetailsShown (!mDetailsText->toPlainText().isEmpty());
 
@@ -383,11 +369,11 @@
     if (mDetailsList.size() > 1)
     {
-        mDetailsSplitter->setButtonEnabled (true, mDetailsIndex < mDetailsList.size() - 1);
-        mDetailsSplitter->setButtonEnabled (false, mDetailsIndex > 0);
+        mDetailsSplitter->setButtonEnabled (true, m_iDetailsIndex < mDetailsList.size() - 1);
+        mDetailsSplitter->setButtonEnabled (false, m_iDetailsIndex > 0);
     }
 
     /* Update details label */
     mDetailsSplitter->setName (mDetailsList.size() == 1 ? tr ("&Details") :
-        tr ("&Details (%1 of %2)").arg (mDetailsIndex + 1).arg (mDetailsList.size()));
+        tr ("&Details (%1 of %2)").arg (m_iDetailsIndex + 1).arg (mDetailsList.size()));
 }
 
@@ -445,7 +431,7 @@
 void QIMessageBox::detailsBack()
 {
-    if (mDetailsIndex > 0)
-    {
-        -- mDetailsIndex;
+    if (m_iDetailsIndex > 0)
+    {
+        -- m_iDetailsIndex;
         refreshDetails();
     }
@@ -454,7 +440,7 @@
 void QIMessageBox::detailsNext()
 {
-    if (mDetailsIndex < mDetailsList.size() - 1)
-    {
-        ++ mDetailsIndex;
+    if (m_iDetailsIndex < mDetailsList.size() - 1)
+    {
+        ++ m_iDetailsIndex;
         refreshDetails();
     }
@@ -473,5 +459,5 @@
 {
     /* Create the error string with all errors. First the html version. */
-    QString strError = "<html><body><p>" + mText + "</p>";
+    QString strError = "<html><body><p>" + m_strMessage + "</p>";
     for (int i = 0; i < mDetailsList.size(); ++i)
         strError += mDetailsList.at(i).first + mDetailsList.at(i).second + "<br>";
Index: trunk/src/VBox/Frontends/VirtualBox/src/extensions/QIMessageBox.h
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/extensions/QIMessageBox.h	(revision 45296)
+++ trunk/src/VBox/Frontends/VirtualBox/src/extensions/QIMessageBox.h	(revision 45297)
@@ -83,7 +83,7 @@
 public:
 
-    QIMessageBox(const QString &aCaption, const QString &aText,
-                 AlertIconType aIcon, int aButton0, int aButton1 = 0, int aButton2 = 0,
-                 QWidget *aParent = 0, const char *aName = 0, bool aModal = TRUE);
+    /* Constructor: */
+    QIMessageBox(const QString &strCaption, const QString &strMessage, AlertIconType icon,
+                 int iButton1 = 0, int iButton2 = 0, int iButton3 = 0, QWidget *pParent = 0);
 
     QString buttonText (int aButton) const;
@@ -106,5 +106,5 @@
 
     void closeEvent (QCloseEvent *e);
-    void showEvent (QShowEvent *e);
+    void polishEvent(QShowEvent *pPolishEvent);
 
     void refreshDetails();
@@ -118,7 +118,7 @@
     void detailsNext();
 
-    void done0() { mWasDone = true; done (mButton0 & AlertButtonMask); }
-    void done1() { mWasDone = true; done (mButton1 & AlertButtonMask); }
-    void done2() { mWasDone = true; done (mButton2 & AlertButtonMask); }
+    void done0() { m_fDone = true; done (mButton1 & AlertButtonMask); }
+    void done1() { m_fDone = true; done (mButton2 & AlertButtonMask); }
+    void done2() { m_fDone = true; done (mButton3 & AlertButtonMask); }
 
     void reject();
@@ -128,5 +128,5 @@
 private:
 
-    int mButton0, mButton1, mButton2, mButtonEsc;
+    int mButton1, mButton2, mButton3, mButtonEsc;
     QLabel *mIconLabel;
     QILabel *mTextLabel;
@@ -138,9 +138,8 @@
     QSpacerItem *mSpacer;
     QIDialogButtonBox *mButtonBox;
-    QString mText;
+    QString m_strMessage;
     QList < QPair <QString, QString> > mDetailsList;
-    int mDetailsIndex;
-    bool mWasDone : 1;
-    bool mWasPolished : 1;
+    int m_iDetailsIndex;
+    bool m_fDone : 1;
 };
 
Index: trunk/src/VBox/Frontends/VirtualBox/src/globals/UIMessageCenter.cpp
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/globals/UIMessageCenter.cpp	(revision 45296)
+++ trunk/src/VBox/Frontends/VirtualBox/src/globals/UIMessageCenter.cpp	(revision 45297)
@@ -3018,5 +3018,5 @@
     QPointer<QIMessageBox> pMessageBox = new QIMessageBox(title, strMessage, icon,
                                                           iButton1, iButton2, iButton3,
-                                                          pMessageBoxParent, strAutoConfirmId.toAscii().constData());
+                                                          pMessageBoxParent);
     mwManager().registerNewParent(pMessageBox, pMessageBoxParent);
 
