Index: trunk/src/VBox/Frontends/VirtualBox/src/VBoxLicenseViewer.cpp
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/VBoxLicenseViewer.cpp	(revision 46830)
+++ trunk/src/VBox/Frontends/VirtualBox/src/VBoxLicenseViewer.cpp	(revision 46831)
@@ -23,5 +23,4 @@
 #include "VBoxLicenseViewer.h"
 #include "QIDialogButtonBox.h"
-#include "VBoxGlobal.h"
 #include "UIMessageCenter.h"
 
@@ -59,5 +58,5 @@
     QVBoxLayout *mainLayout = new QVBoxLayout (this);
     mainLayout->setSpacing (10);
-    VBoxGlobal::setLayoutMargin (mainLayout, 10);
+    mainLayout->setContentsMargins(10, 10, 10, 10);
     mainLayout->addWidget (mLicenseText);
     mainLayout->addWidget (dbb);
Index: trunk/src/VBox/Frontends/VirtualBox/src/extensions/QIAdvancedSlider.cpp
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/extensions/QIAdvancedSlider.cpp	(revision 46830)
+++ trunk/src/VBox/Frontends/VirtualBox/src/extensions/QIAdvancedSlider.cpp	(revision 46831)
@@ -19,5 +19,4 @@
 
 #include "QIAdvancedSlider.h"
-#include "VBoxGlobal.h"
 
 /* Qt includes */
@@ -263,5 +262,5 @@
 
     QVBoxLayout *pMainLayout = new QVBoxLayout(this);
-    VBoxGlobal::setLayoutMargin(pMainLayout, 0);
+    pMainLayout->setContentsMargins(0, 0, 0, 0);
     m_pSlider = new CPrivateSlider(fOrientation, this);
     pMainLayout->addWidget(m_pSlider);
Index: trunk/src/VBox/Frontends/VirtualBox/src/extensions/QIArrowSplitter.cpp
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/extensions/QIArrowSplitter.cpp	(revision 46830)
+++ trunk/src/VBox/Frontends/VirtualBox/src/extensions/QIArrowSplitter.cpp	(revision 46831)
@@ -19,8 +19,8 @@
 
 /* VBox includes */
-#include "VBoxGlobal.h"
 #include "QIArrowSplitter.h"
 
 /* Qt includes */
+#include <QApplication>
 #include <QHBoxLayout>
 #include <QKeyEvent>
@@ -35,5 +35,5 @@
 {
     /* Setup main-layout */
-    VBoxGlobal::setLayoutMargin (mMainLayout, 0);
+    mMainLayout->setContentsMargins(0, 0, 0, 0);
     mMainLayout->setSpacing(3);
 
@@ -49,5 +49,5 @@
     /* Setup button layout */
     QHBoxLayout *buttonLayout = new QHBoxLayout();
-    VBoxGlobal::setLayoutMargin (buttonLayout, 0);
+    buttonLayout->setContentsMargins(0, 0, 0, 0);
     buttonLayout->setSpacing (0);
     buttonLayout->addWidget (mSwitchButton);
Index: trunk/src/VBox/Frontends/VirtualBox/src/extensions/QILabelSeparator.cpp
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/extensions/QILabelSeparator.cpp	(revision 46830)
+++ trunk/src/VBox/Frontends/VirtualBox/src/extensions/QILabelSeparator.cpp	(revision 46831)
@@ -24,5 +24,4 @@
 /* Local includes */
 #include "QILabelSeparator.h"
-#include "VBoxGlobal.h"
 
 QILabelSeparator::QILabelSeparator (QWidget *aParent /* = NULL */, Qt::WindowFlags aFlags /* = 0 */)
@@ -73,5 +72,5 @@
 
     QHBoxLayout *pLayout = new QHBoxLayout (this);
-    VBoxGlobal::setLayoutMargin (pLayout, 0);
+    pLayout->setContentsMargins(0, 0, 0, 0);
     pLayout->addWidget (mLabel);
     pLayout->addWidget (separator, Qt::AlignBottom);
Index: trunk/src/VBox/Frontends/VirtualBox/src/extensions/QIMessageBox.cpp
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/extensions/QIMessageBox.cpp	(revision 46830)
+++ trunk/src/VBox/Frontends/VirtualBox/src/extensions/QIMessageBox.cpp	(revision 46831)
@@ -33,5 +33,7 @@
 #include "QIArrowSplitter.h"
 #include "QIDialogButtonBox.h"
-#include "VBoxGlobal.h"
+
+/* Other VBox includes: */
+#include <VBox/sup.h>
 
 QIMessageBox::QIMessageBox(const QString &strCaption, const QString &strMessage, AlertIconType iconType,
@@ -202,5 +204,5 @@
         pMainLayout->setSpacing(15);
 #else /* !Q_WS_MAC */
-        VBoxGlobal::setLayoutMargin(pMainLayout, 11);
+        pMainLayout->setContentsMargins(11, 11, 11, 11);
         pMainLayout->setSpacing(10);
 #endif /* !Q_WS_MAC */
@@ -211,5 +213,5 @@
             pMainLayout->addLayout(pTopLayout);
             /* Configure layout: */
-            VBoxGlobal::setLayoutMargin(pTopLayout, 0);
+            pTopLayout->setContentsMargins(0, 0, 0, 0);
             pTopLayout->setSpacing(10);
             /* Create icon-label: */
Index: trunk/src/VBox/Frontends/VirtualBox/src/extensions/QIRichToolButton.cpp
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/extensions/QIRichToolButton.cpp	(revision 46830)
+++ trunk/src/VBox/Frontends/VirtualBox/src/extensions/QIRichToolButton.cpp	(revision 46831)
@@ -19,8 +19,8 @@
 
 /* VBox includes */
-#include "VBoxGlobal.h"
 #include "QIRichToolButton.h"
 
 /* Qt includes */
+#include <QApplication>
 #include <QLabel>
 #include <QHBoxLayout>
@@ -64,5 +64,5 @@
     /* Setup main-layout */
     QHBoxLayout *mainLayout = new QHBoxLayout (this);
-    VBoxGlobal::setLayoutMargin (mainLayout, 0);
+    mainLayout->setContentsMargins(0, 0, 0, 0);
     mainLayout->setSpacing (0);
     mainLayout->addWidget (mButton);
Index: trunk/src/VBox/Frontends/VirtualBox/src/globals/VBoxGlobal.h
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/globals/VBoxGlobal.h	(revision 46830)
+++ trunk/src/VBox/Frontends/VirtualBox/src/globals/VBoxGlobal.h	(revision 46831)
@@ -343,16 +343,4 @@
     static QList <QPair <QString, QString> > DVDBackends();
     static QList <QPair <QString, QString> > FloppyBackends();
-
-    /* Qt 4.2.0 support function */
-    static inline void setLayoutMargin (QLayout *aLayout, int aMargin)
-    {
-#if QT_VERSION < 0x040300
-        /* Deprecated since > 4.2 */
-        aLayout->setMargin (aMargin);
-#else
-        /* New since > 4.2 */
-        aLayout->setContentsMargins (aMargin, aMargin, aMargin, aMargin);
-#endif
-    }
 
     static QString documentsPath();
Index: trunk/src/VBox/Frontends/VirtualBox/src/medium/UIMediumManager.cpp
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/medium/UIMediumManager.cpp	(revision 46830)
+++ trunk/src/VBox/Frontends/VirtualBox/src/medium/UIMediumManager.cpp	(revision 46831)
@@ -190,5 +190,5 @@
 
         QHBoxLayout *layout = new QHBoxLayout (this);
-        VBoxGlobal::setLayoutMargin (layout, 0);
+        layout->setContentsMargins(0, 0, 0, 0);
         layout->addWidget (mText);
         layout->addWidget (mProgressBar);
@@ -367,5 +367,5 @@
     mToolBar->setMacToolbar();
     /* No spacing/margin on the mac */
-    VBoxGlobal::setLayoutMargin (mainLayout, 0);
+    mainLayout->setContentsMargins(0, 0, 0, 0);
     mainLayout->insertSpacing (0, 10);
 #else /* MAC_LEOPARD_STYLE */
@@ -374,5 +374,5 @@
     /* Set spacing/margin like in the selector window */
     mainLayout->setSpacing (5);
-    VBoxGlobal::setLayoutMargin (mainLayout, 5);
+    mainLayout->setContentsMargins(5, 5, 5, 5);
 #endif /* MAC_LEOPARD_STYLE */
 
Index: trunk/src/VBox/Frontends/VirtualBox/src/runtime/normal/UIMachineWindowNormal.cpp
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/runtime/normal/UIMachineWindowNormal.cpp	(revision 46830)
+++ trunk/src/VBox/Frontends/VirtualBox/src/runtime/normal/UIMachineWindowNormal.cpp	(revision 46831)
@@ -240,5 +240,5 @@
     QWidget *pIndicatorBox = new QWidget;
     QHBoxLayout *pIndicatorBoxHLayout = new QHBoxLayout(pIndicatorBox);
-    VBoxGlobal::setLayoutMargin(pIndicatorBoxHLayout, 0);
+    pIndicatorBoxHLayout->setContentsMargins(0, 0, 0, 0);
     pIndicatorBoxHLayout->setSpacing(5);
     bool fAtLeastOneAddedToLeftSection = false;
@@ -335,5 +335,5 @@
             if (QHBoxLayout *pContainerLayoutHostkey = new QHBoxLayout(pContainerWidgetHostkey))
             {
-                VBoxGlobal::setLayoutMargin(pContainerLayoutHostkey, 0);
+                pContainerLayoutHostkey->setContentsMargins(0, 0, 0, 0);
                 pContainerLayoutHostkey->setSpacing(3);
                 m_pNameHostkey = new QLabel(UIHostCombo::toReadableString(vboxGlobal().settings().hostCombo()));
Index: trunk/src/VBox/Frontends/VirtualBox/src/settings/VBoxSettingsSelector.cpp
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/settings/VBoxSettingsSelector.cpp	(revision 46830)
+++ trunk/src/VBox/Frontends/VirtualBox/src/settings/VBoxSettingsSelector.cpp	(revision 46831)
@@ -21,9 +21,10 @@
 #include <QHeaderView>
 #include <QTabWidget>
+#include <QLayout>
+#include <QAction>
 
 /* Local includes */
 #include "VBoxSettingsSelector.h"
 #include "UISettingsPage.h"
-#include "VBoxGlobal.h"
 #include "UIToolBar.h"
 #include "QITreeWidget.h"
@@ -231,5 +232,5 @@
         twitem->setIcon (treeWidget_Category, item->icon());
         aPage->setContentsMargins (0, 0, 0, 0);
-        VBoxGlobal::setLayoutMargin (aPage->layout(), 0);
+        aPage->layout()->setContentsMargins(0, 0, 0, 0);
         result = aPage;
     }
@@ -424,5 +425,5 @@
         mTbSelector->addAction (item->action());
         aPage->setContentsMargins (0, 0, 0, 0);
-        VBoxGlobal::setLayoutMargin (aPage->layout(), 0);
+        aPage->layout()->setContentsMargins(0, 0, 0, 0);
         result = aPage;
     }
@@ -446,5 +447,5 @@
             QTabWidget *tabWidget = parent->tabWidget();
             aPage->setContentsMargins (9, 5, 9, 9);
-            VBoxGlobal::setLayoutMargin (aPage->layout(), 0);
+            aPage->layout()->setContentsMargins(0, 0, 0, 0);
             QIcon icon1 (aSmallIcon);
             if (!aSmallIconDisabled.isEmpty())
Index: trunk/src/VBox/Frontends/VirtualBox/src/widgets/VBoxWarningPane.cpp
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/widgets/VBoxWarningPane.cpp	(revision 46830)
+++ trunk/src/VBox/Frontends/VirtualBox/src/widgets/VBoxWarningPane.cpp	(revision 46831)
@@ -23,5 +23,4 @@
 /* Local includes */
 #include "VBoxWarningPane.h"
-#include "VBoxGlobal.h"
 
 VBoxWarningPane::VBoxWarningPane(QWidget *pParent)
@@ -29,5 +28,5 @@
 {
     QHBoxLayout *pLayout = new QHBoxLayout(this);
-    VBoxGlobal::setLayoutMargin(pLayout, 0);
+    pLayout->setContentsMargins(0, 0, 0, 0);
     pLayout->addWidget(&m_icon);
     pLayout->addWidget(&m_label);
