Index: trunk/src/VBox/Frontends/VirtualBox/VBoxUI.pro
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/VBoxUI.pro	(revision 85644)
+++ trunk/src/VBox/Frontends/VirtualBox/VBoxUI.pro	(revision 85645)
@@ -41,5 +41,4 @@
     src/settings/machine/UIMachineSettingsUSB.ui \
     src/settings/machine/UIMachineSettingsUSBFilterDetails.ui \
-    src/settings/machine/UIMachineSettingsSFDetails.ui \
     src/settings/machine/UIMachineSettingsInterface.ui
 
Index: trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsSF.cpp
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsSF.cpp	(revision 85644)
+++ trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsSF.cpp	(revision 85645)
@@ -20,4 +20,5 @@
 #include <QMenu>
 #include <QTimer>
+#include <QVBoxLayout>
 
 /* GUI includes: */
@@ -693,5 +694,5 @@
     if (objectName().isEmpty())
         setObjectName(QStringLiteral("UIMachineSettingsSF"));
-    resize(300, 228);
+    resize(300, 220);
     QVBoxLayout *pMainLayout = new QVBoxLayout(this);
     pMainLayout->setObjectName(QStringLiteral("pMainLayout"));
Index: trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsSFDetails.cpp
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsSFDetails.cpp	(revision 85644)
+++ trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsSFDetails.cpp	(revision 85645)
@@ -17,8 +17,14 @@
 
 /* Qt includes */
+#include <QCheckBox>
 #include <QDir>
+#include <QGridLayout>
+#include <QLabel>
+#include <QLineEdit>
 #include <QPushButton>
 
-/* Other includes */
+/* GUI includes */
+#include "QIDialogButtonBox.h"
+#include "UIFilePathSelector.h"
 #include "UIMachineSettingsSFDetails.h"
 #include "UICommon.h"
@@ -29,24 +35,33 @@
                                                        const QStringList &usedNames,
                                                        QWidget *pParent /* = 0 */)
-   : QIWithRetranslateUI2<QIDialog>(pParent)
-   , m_type(type)
-   , m_fUsePermanent(fEnableSelector)
-   , m_usedNames(usedNames)
-{
-    /* Apply UI decorations: */
-    Ui::UIMachineSettingsSFDetails::setupUi(this);
+    : QIWithRetranslateUI2<QIDialog>(pParent)
+    , m_type(type)
+    , m_fUsePermanent(fEnableSelector)
+    , m_usedNames(usedNames)
+    , m_pPathSelector(0)
+    , m_pPermanentCheckBox(0)
+    , m_pNameLineEdit(0)
+    , m_pReadonlyCheckBox(0)
+    , m_pAutoMountCheckBox(0)
+    , m_pAutoMountPointLineEdit(0)
+    , m_pPathLabel(0)
+    , m_pNameLabel(0)
+    , m_pAutoMountPointLabel(0)
+    , m_pButtonBox(0)
+{
+    prepareWidgets();
 
     /* Setup widgets: */
-    mPsPath->setResetEnabled(false);
-    mPsPath->setHomeDir(QDir::homePath());
-    mCbPermanent->setHidden(!fEnableSelector);
+    m_pPathSelector->setResetEnabled(false);
+    m_pPathSelector->setHomeDir(QDir::homePath());
+    m_pPermanentCheckBox->setHidden(!fEnableSelector);
 
     /* Setup connections: */
-    connect(mPsPath, static_cast<void(UIFilePathSelector::*)(int)>(&UIFilePathSelector::currentIndexChanged),
+    connect(m_pPathSelector, static_cast<void(UIFilePathSelector::*)(int)>(&UIFilePathSelector::currentIndexChanged),
             this, &UIMachineSettingsSFDetails::sltSelectPath);
-    connect(mPsPath, &UIFilePathSelector::pathChanged, this, &UIMachineSettingsSFDetails::sltSelectPath);
-    connect(mLeName, &QLineEdit::textChanged, this, &UIMachineSettingsSFDetails::sltValidate);
+    connect(m_pPathSelector, &UIFilePathSelector::pathChanged, this, &UIMachineSettingsSFDetails::sltSelectPath);
+    connect(m_pNameLineEdit, &QLineEdit::textChanged, this, &UIMachineSettingsSFDetails::sltValidate);
     if (fEnableSelector)
-        connect(mCbPermanent, &QCheckBox::toggled, this, &UIMachineSettingsSFDetails::sltValidate);
+        connect(m_pPermanentCheckBox, &QCheckBox::toggled, this, &UIMachineSettingsSFDetails::sltValidate);
 
      /* Applying language settings: */
@@ -65,68 +80,138 @@
 }
 
+void UIMachineSettingsSFDetails::prepareWidgets()
+{
+    if (objectName().isEmpty())
+        setObjectName(QStringLiteral("UIMachineSettingsSFDetails"));
+    resize(218, 196);
+    QGridLayout *gridLayout = new QGridLayout(this);
+    gridLayout->setObjectName(QStringLiteral("gridLayout"));
+    m_pPathLabel = new QLabel;
+    m_pPathLabel->setObjectName(QStringLiteral("m_pPathLabel"));
+    m_pPathLabel->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter);
+
+    gridLayout->addWidget(m_pPathLabel, 0, 0, 1, 1);
+
+    m_pPathSelector = new UIFilePathSelector;
+    m_pPathSelector->setObjectName(QStringLiteral("m_pPathSelector"));
+    gridLayout->addWidget(m_pPathSelector, 0, 1, 1, 1);
+
+    m_pNameLabel = new QLabel;
+    m_pNameLabel->setObjectName(QStringLiteral("m_pNameLabel"));
+    m_pNameLabel->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter);
+    gridLayout->addWidget(m_pNameLabel, 1, 0, 1, 1);
+
+    m_pNameLineEdit = new QLineEdit;
+    m_pNameLineEdit->setObjectName(QStringLiteral("m_pNameLineEdit"));
+    gridLayout->addWidget(m_pNameLineEdit, 1, 1, 1, 1);
+
+    m_pReadonlyCheckBox = new QCheckBox;
+    m_pReadonlyCheckBox->setObjectName(QStringLiteral("m_pReadonlyCheckBox"));
+    gridLayout->addWidget(m_pReadonlyCheckBox, 2, 1, 1, 1);
+
+    m_pAutoMountCheckBox = new QCheckBox;
+    m_pAutoMountCheckBox->setObjectName(QStringLiteral("m_pAutoMountCheckBox"));
+    gridLayout->addWidget(m_pAutoMountCheckBox, 3, 1, 1, 1);
+
+    m_pAutoMountPointLabel = new QLabel;
+    m_pAutoMountPointLabel->setObjectName(QStringLiteral("m_pAutoMountPointLabel"));
+    m_pAutoMountPointLabel->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter);
+    gridLayout->addWidget(m_pAutoMountPointLabel, 4, 0, 1, 1);
+
+    m_pAutoMountPointLineEdit = new QLineEdit;
+    m_pAutoMountPointLineEdit->setObjectName(QStringLiteral("m_pAutoMountPointLineEdit"));
+    gridLayout->addWidget(m_pAutoMountPointLineEdit, 4, 1, 1, 1);
+
+    m_pPermanentCheckBox = new QCheckBox;
+    m_pPermanentCheckBox->setObjectName(QStringLiteral("m_pPermanentCheckBox"));
+    gridLayout->addWidget(m_pPermanentCheckBox, 5, 1, 1, 1);
+
+    QSpacerItem *spacerItem = new QSpacerItem(20, 40, QSizePolicy::Minimum, QSizePolicy::Expanding);
+    gridLayout->addItem(spacerItem, 6, 1, 1, 1);
+
+    m_pButtonBox = new QIDialogButtonBox;
+    m_pButtonBox->setObjectName(QStringLiteral("m_pButtonBox"));
+    m_pButtonBox->setStandardButtons(QDialogButtonBox::Cancel|QDialogButtonBox::NoButton|QDialogButtonBox::Ok);
+    gridLayout->addWidget(m_pButtonBox, 7, 0, 1, 2);
+
+
+    QObject::connect(m_pButtonBox, &QIDialogButtonBox::accepted, this, &UIMachineSettingsSFDetails::accept);
+    QObject::connect(m_pButtonBox, &QIDialogButtonBox::rejected, this, &UIMachineSettingsSFDetails::reject);
+}
+
+
 void UIMachineSettingsSFDetails::setPath(const QString &strPath)
 {
-    mPsPath->setPath(strPath);
+    m_pPathSelector->setPath(strPath);
 }
 
 QString UIMachineSettingsSFDetails::path() const
 {
-    return mPsPath->path();
+    return m_pPathSelector->path();
 }
 
 void UIMachineSettingsSFDetails::setName(const QString &strName)
 {
-    mLeName->setText(strName);
+    m_pNameLineEdit->setText(strName);
 }
 
 QString UIMachineSettingsSFDetails::name() const
 {
-    return mLeName->text();
+    return m_pNameLineEdit->text();
 }
 
 void UIMachineSettingsSFDetails::setWriteable(bool fWritable)
 {
-    mCbReadonly->setChecked(!fWritable);
+    m_pReadonlyCheckBox->setChecked(!fWritable);
 }
 
 bool UIMachineSettingsSFDetails::isWriteable() const
 {
-    return !mCbReadonly->isChecked();
+    return !m_pReadonlyCheckBox->isChecked();
 }
 
 void UIMachineSettingsSFDetails::setAutoMount(bool fAutoMount)
 {
-    mCbAutoMount->setChecked(fAutoMount);
+    m_pAutoMountCheckBox->setChecked(fAutoMount);
 }
 
 bool UIMachineSettingsSFDetails::isAutoMounted() const
 {
-    return mCbAutoMount->isChecked();
+    return m_pAutoMountCheckBox->isChecked();
 }
 
 void UIMachineSettingsSFDetails::setAutoMountPoint(const QString &strAutoMountPoint)
 {
-    mLeAutoMountPoint->setText(strAutoMountPoint);
+    m_pAutoMountPointLineEdit->setText(strAutoMountPoint);
 }
 
 QString UIMachineSettingsSFDetails::autoMountPoint() const
 {
-    return mLeAutoMountPoint->text();
+    return m_pAutoMountPointLineEdit->text();
 }
 
 void UIMachineSettingsSFDetails::setPermanent(bool fPermanent)
 {
-    mCbPermanent->setChecked(fPermanent);
+    m_pPermanentCheckBox->setChecked(fPermanent);
 }
 
 bool UIMachineSettingsSFDetails::isPermanent() const
 {
-    return m_fUsePermanent ? mCbPermanent->isChecked() : true;
+    return m_fUsePermanent ? m_pPermanentCheckBox->isChecked() : true;
 }
 
 void UIMachineSettingsSFDetails::retranslateUi()
 {
-    /* Translate uic generated strings: */
-    Ui::UIMachineSettingsSFDetails::retranslateUi(this);
+    m_pPathLabel->setText(QApplication::translate("UIMachineSettingsSFDetails", "Folder Path:"));
+    m_pNameLabel->setText(QApplication::translate("UIMachineSettingsSFDetails", "Folder Name:"));
+    m_pNameLineEdit->setToolTip(QApplication::translate("UIMachineSettingsSFDetails", "Holds the name of the shared folder (as it will be seen by the guest OS)."));
+    m_pReadonlyCheckBox->setToolTip(QApplication::translate("UIMachineSettingsSFDetails", "When checked, the guest OS will not be able to write to the specified shared folder."));
+    m_pReadonlyCheckBox->setText(QApplication::translate("UIMachineSettingsSFDetails", "&Read-only"));
+    m_pAutoMountCheckBox->setToolTip(QApplication::translate("UIMachineSettingsSFDetails", "When checked, the guest OS will try to automatically mount the shared folder on startup."));
+    m_pAutoMountCheckBox->setText(QApplication::translate("UIMachineSettingsSFDetails", "&Auto-mount"));
+    m_pAutoMountPointLabel->setText(QApplication::translate("UIMachineSettingsSFDetails", "Mount point:"));
+    m_pAutoMountPointLineEdit->setToolTip(QApplication::translate("UIMachineSettingsSFDetails", "Where to automatically mount the folder in the guest.  A drive letter (e.g. 'G:') for Windows and OS/2 guests, path for the others.  If left empty the guest will pick something fitting."));
+    m_pPermanentCheckBox->setToolTip(QApplication::translate("UIMachineSettingsSFDetails", "When checked, this shared folder will be permanent."));
+    m_pPermanentCheckBox->setText(QApplication::translate("UIMachineSettingsSFDetails", "&Make Permanent"));
 
     switch (m_type)
@@ -145,17 +230,17 @@
 void UIMachineSettingsSFDetails::sltValidate()
 {
-    mButtonBox->button(QDialogButtonBox::Ok)->setEnabled(!mPsPath->path().isEmpty() &&
-                                                         QDir(mPsPath->path()).exists() &&
-                                                         !mLeName->text().trimmed().isEmpty() &&
-                                                         !mLeName->text().contains(" ") &&
-                                                         !m_usedNames.contains(mLeName->text()));
+    m_pButtonBox->button(QDialogButtonBox::Ok)->setEnabled(!m_pPathSelector->path().isEmpty() &&
+                                                         QDir(m_pPathSelector->path()).exists() &&
+                                                         !m_pNameLineEdit->text().trimmed().isEmpty() &&
+                                                         !m_pNameLineEdit->text().contains(" ") &&
+                                                         !m_usedNames.contains(m_pNameLineEdit->text()));
 }
 
 void UIMachineSettingsSFDetails::sltSelectPath()
 {
-    if (!mPsPath->isPathSelected())
+    if (!m_pPathSelector->isPathSelected())
         return;
 
-    QString strFolderName(mPsPath->path());
+    QString strFolderName(m_pPathSelector->path());
 #if defined (VBOX_WS_WIN) || defined (Q_OS_OS2)
     if (strFolderName[0].isLetter() && strFolderName[1] == ':' && strFolderName[2] == 0)
@@ -164,5 +249,5 @@
          * Append the trailing backslash to get a valid root path 'X:\': */
         strFolderName += "\\";
-        mPsPath->setPath(strFolderName);
+        m_pPathSelector->setPath(strFolderName);
     }
 #endif /* VBOX_WS_WIN || Q_OS_OS2 */
@@ -171,5 +256,5 @@
     {
         /* Processing non-root folder */
-        mLeName->setText(folder.dirName().replace(' ', '_'));
+        m_pNameLineEdit->setText(folder.dirName().replace(' ', '_'));
     }
     else
@@ -177,7 +262,7 @@
         /* Processing root folder: */
 #if defined (VBOX_WS_WIN) || defined (Q_OS_OS2)
-        mLeName->setText(strFolderName.toUpper()[0] + "_DRIVE");
+        m_pNameLineEdit->setText(strFolderName.toUpper()[0] + "_DRIVE");
 #elif defined (VBOX_WS_X11)
-        mLeName->setText("ROOT");
+        m_pNameLineEdit->setText("ROOT");
 #endif
     }
Index: trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsSFDetails.h
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsSFDetails.h	(revision 85644)
+++ trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsSFDetails.h	(revision 85645)
@@ -23,12 +23,16 @@
 
 /* Includes */
-#include "UIMachineSettingsSFDetails.gen.h"
 #include "QIDialog.h"
 #include "QIWithRetranslateUI.h"
 #include "UIMachineSettingsSF.h"
 
+class UIFilePathSelector;
+class QCheckBox;
+class QLabel;
+class QLineEdit;
+class QIDialogButtonBox;
+
 /* Shared folders details dialog: */
-class SHARED_LIBRARY_STUFF UIMachineSettingsSFDetails : public QIWithRetranslateUI2<QIDialog>,
-                                                        public Ui::UIMachineSettingsSFDetails
+class SHARED_LIBRARY_STUFF UIMachineSettingsSFDetails : public QIWithRetranslateUI2<QIDialog>
 {
     Q_OBJECT;
@@ -76,7 +80,24 @@
 private:
 
+    void prepareWidgets();
+
     SFDialogType  m_type;
     bool          m_fUsePermanent;
     QStringList   m_usedNames;
+    UISettingsCacheSharedFolders *m_pCache;
+
+    /** @name Widgets
+      * @{ */
+        UIFilePathSelector *m_pPathSelector;
+        QCheckBox *m_pPermanentCheckBox;
+        QLineEdit *m_pNameLineEdit;
+        QCheckBox *m_pReadonlyCheckBox;
+        QCheckBox *m_pAutoMountCheckBox;
+        QLineEdit *m_pAutoMountPointLineEdit;
+        QLabel *m_pPathLabel;
+        QLabel *m_pNameLabel;
+        QLabel *m_pAutoMountPointLabel;
+        QIDialogButtonBox *m_pButtonBox;
+    /** @} */
 };
 
Index: trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsSFDetails.ui
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsSFDetails.ui	(revision 85644)
+++ 	(revision )
@@ -1,173 +1,0 @@
-<ui version="4.0" >
- <comment>
- VBox frontends: Qt GUI ("VirtualBox"):
-
- Copyright (C) 2008-2020 Oracle Corporation
-
- This file is part of VirtualBox Open Source Edition (OSE), as
- available from http://www.virtualbox.org. This file is free software;
- you can redistribute it and/or modify it under the terms of the GNU
- General Public License (GPL) as published by the Free Software
- Foundation, in version 2 as it comes in the "COPYING" file of the
- VirtualBox OSE distribution. VirtualBox OSE is distributed in the
- hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
- </comment>
- <class>UIMachineSettingsSFDetails</class>
- <widget class="QDialog" name="UIMachineSettingsSFDetails" >
-  <property name="geometry" >
-   <rect>
-    <x>0</x>
-    <y>0</y>
-    <width>218</width>
-    <height>196</height>
-   </rect>
-  </property>
-  <layout class="QGridLayout" >
-   <item row="0" column="0" >
-    <widget class="QLabel" name="mLbPath" >
-     <property name="text" >
-      <string>Folder Path:</string>
-     </property>
-     <property name="alignment" >
-      <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
-     </property>
-    </widget>
-   </item>
-   <item row="0" column="1" >
-    <widget class="UIFilePathSelector" name="mPsPath" />
-   </item>
-   <item row="1" column="0" >
-    <widget class="QLabel" name="mLbName" >
-     <property name="text" >
-      <string>Folder Name:</string>
-     </property>
-     <property name="alignment" >
-      <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
-     </property>
-    </widget>
-   </item>
-   <item row="1" column="1" >
-    <widget class="QLineEdit" name="mLeName" >
-     <property name="toolTip" >
-      <string>Holds the name of the shared folder (as it will be seen by the guest OS).</string>
-     </property>
-    </widget>
-   </item>
-   <item row="2" column="1" >
-    <widget class="QCheckBox" name="mCbReadonly" >
-     <property name="toolTip" >
-      <string>When checked, the guest OS will not be able to write to the specified shared folder.</string>
-     </property>
-     <property name="text" >
-      <string>&amp;Read-only</string>
-     </property>
-    </widget>
-   </item>
-   <item row="3" column="1" >
-    <widget class="QCheckBox" name="mCbAutoMount" >
-     <property name="toolTip" >
-      <string>When checked, the guest OS will try to automatically mount the shared folder on startup.</string>
-     </property>
-     <property name="text" >
-      <string>&amp;Auto-mount</string>
-     </property>
-    </widget>
-   </item>
-   <item row="4" column="0" >
-    <widget class="QLabel" name="mLbAutoMountPoint" >
-     <property name="text" >
-      <string>Mount point:</string>
-     </property>
-     <property name="alignment" >
-      <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
-     </property>
-    </widget>
-   </item>
-   <item row="4" column="1" >
-    <widget class="QLineEdit" name="mLeAutoMountPoint" >
-     <property name="toolTip" >
-      <string>Where to automatically mount the folder in the guest.  A drive letter (e.g. 'G:') for Windows and OS/2 guests, path for the others.  If left empty the guest will pick something fitting.</string>
-     </property>
-    </widget>
-   </item>
-   <item row="5" column="1" >
-    <widget class="QCheckBox" name="mCbPermanent" >
-     <property name="toolTip" >
-      <string>When checked, this shared folder will be permanent.</string>
-     </property>
-     <property name="text" >
-      <string>&amp;Make Permanent</string>
-     </property>
-    </widget>
-   </item>
-   <item row="6" column="1" >
-    <spacer>
-     <property name="orientation" >
-      <enum>Qt::Vertical</enum>
-     </property>
-     <property name="sizeHint" >
-      <size>
-       <width>20</width>
-       <height>40</height>
-      </size>
-     </property>
-    </spacer>
-   </item>
-   <item row="7" column="0" colspan="2" >
-    <widget class="QIDialogButtonBox" name="mButtonBox" >
-     <property name="standardButtons" >
-      <set>QDialogButtonBox::Cancel|QDialogButtonBox::NoButton|QDialogButtonBox::Ok</set>
-     </property>
-    </widget>
-   </item>
-  </layout>
- </widget>
- <customwidgets>
-  <customwidget>
-   <class>UIFilePathSelector</class>
-   <extends>QComboBox</extends>
-   <header>UIFilePathSelector.h</header>
-   <container>1</container>
-  </customwidget>
-  <customwidget>
-   <class>QIDialogButtonBox</class>
-   <extends>QDialogButtonBox</extends>
-   <header>QIDialogButtonBox.h</header>
-  </customwidget>
- </customwidgets>
- <resources/>
- <connections>
-  <connection>
-   <sender>mButtonBox</sender>
-   <signal>accepted()</signal>
-   <receiver>UIMachineSettingsSFDetails</receiver>
-   <slot>accept()</slot>
-   <hints>
-    <hint type="sourcelabel" >
-     <x>108</x>
-     <y>158</y>
-    </hint>
-    <hint type="destinationlabel" >
-     <x>108</x>
-     <y>90</y>
-    </hint>
-   </hints>
-  </connection>
-  <connection>
-   <sender>mButtonBox</sender>
-   <signal>rejected()</signal>
-   <receiver>UIMachineSettingsSFDetails</receiver>
-   <slot>reject()</slot>
-   <hints>
-    <hint type="sourcelabel" >
-     <x>108</x>
-     <y>158</y>
-    </hint>
-    <hint type="destinationlabel" >
-     <x>108</x>
-     <y>90</y>
-    </hint>
-   </hints>
-  </connection>
- </connections>
-</ui>
