Index: trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIApplianceExportEditorWidget.cpp
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIApplianceExportEditorWidget.cpp	(revision 91537)
+++ trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIApplianceExportEditorWidget.cpp	(revision 91538)
@@ -29,12 +29,14 @@
 
 
-////////////////////////////////////////////////////////////////////////////////
-// ExportSortProxyModel
+/*********************************************************************************************************************************
+*   Class ExportSortProxyModel implementation.                                                                                   *
+*********************************************************************************************************************************/
 
 class ExportSortProxyModel: public UIApplianceSortProxyModel
 {
 public:
-    ExportSortProxyModel(QObject *pParent = NULL)
-      : UIApplianceSortProxyModel(pParent)
+
+    ExportSortProxyModel(QObject *pParent = 0)
+        : UIApplianceSortProxyModel(pParent)
     {
         m_aFilteredList
@@ -55,20 +57,21 @@
 };
 
-////////////////////////////////////////////////////////////////////////////////
-// UIApplianceExportEditorWidget
 
-UIApplianceExportEditorWidget::UIApplianceExportEditorWidget(QWidget *pParent /* = NULL */)
-  : UIApplianceEditorWidget(pParent)
+/*********************************************************************************************************************************
+*   Class UIApplianceExportEditorWidget implementation.                                                                          *
+*********************************************************************************************************************************/
+
+UIApplianceExportEditorWidget::UIApplianceExportEditorWidget(QWidget *pParent /* = 0 */)
+    : UIApplianceEditorWidget(pParent)
 {
 }
 
-CAppliance* UIApplianceExportEditorWidget::init()
+CAppliance *UIApplianceExportEditorWidget::init()
 {
     if (m_pAppliance)
         delete m_pAppliance;
-    CVirtualBox vbox = uiCommon().virtualBox();
-    /* Create a appliance object */
-    m_pAppliance = new CAppliance(vbox.CreateAppliance());
-//    bool fResult = m_pAppliance->isOk();
+    CVirtualBox comVBox = uiCommon().virtualBox();
+    /* Create a appliance object: */
+    m_pAppliance = new CAppliance(comVBox.CreateAppliance());
     return m_pAppliance;
 }
@@ -76,39 +79,43 @@
 void UIApplianceExportEditorWidget::populate()
 {
+    /* Cleanup previous stuff: */
     if (m_pModel)
         delete m_pModel;
 
+    /* Prepare model: */
     QVector<CVirtualSystemDescription> vsds = m_pAppliance->GetVirtualSystemDescriptions();
+    m_pModel = new UIApplianceModel(vsds, m_pTreeViewSettings);
+    if (m_pModel)
+    {
+        m_pModel->setVsdHints(m_listVsdHints);
 
-    m_pModel = new UIApplianceModel(vsds, m_pTreeViewSettings);
-    m_pModel->setVsdHints(m_listVsdHints);
+        /* Create proxy model: */
+        ExportSortProxyModel *pProxy = new ExportSortProxyModel(m_pModel);
+        if (pProxy)
+        {
+            pProxy->setSourceModel(m_pModel);
+            pProxy->sort(ApplianceViewSection_Description, Qt::DescendingOrder);
 
-    ExportSortProxyModel *pProxy = new ExportSortProxyModel(this);
-    pProxy->setSourceModel(m_pModel);
-    pProxy->sort(ApplianceViewSection_Description, Qt::DescendingOrder);
+            /* Set our own model: */
+            m_pTreeViewSettings->setModel(pProxy);
+            /* Set our own delegate: */
+            UIApplianceDelegate *pDelegate = new UIApplianceDelegate(pProxy);
+            if (pDelegate)
+                m_pTreeViewSettings->setItemDelegate(pDelegate);
 
-    UIApplianceDelegate *pDelegate = new UIApplianceDelegate(pProxy);
+            /* For now we hide the original column. This data is displayed as tooltip also. */
+            m_pTreeViewSettings->setColumnHidden(ApplianceViewSection_OriginalValue, true);
+            m_pTreeViewSettings->expandAll();
+            /* Set model root index and make it current: */
+            m_pTreeViewSettings->setRootIndex(pProxy->mapFromSource(m_pModel->root()));
+            m_pTreeViewSettings->setCurrentIndex(pProxy->mapFromSource(m_pModel->root()));
+        }
+    }
 
-    /* Set our own model */
-    m_pTreeViewSettings->setModel(pProxy);
-    /* Set our own delegate */
-    m_pTreeViewSettings->setItemDelegate(pDelegate);
-    /* For now we hide the original column. This data is displayed as tooltip
-       also. */
-    m_pTreeViewSettings->setColumnHidden(ApplianceViewSection_OriginalValue, true);
-    m_pTreeViewSettings->expandAll();
-    /* Set model root index and make it current: */
-    m_pTreeViewSettings->setRootIndex(pProxy->mapFromSource(m_pModel->root()));
-    m_pTreeViewSettings->setCurrentIndex(pProxy->mapFromSource(m_pModel->root()));
-
-    /* Check for warnings & if there are one display them. */
-    bool fWarningsEnabled = false;
-    QVector<QString> warnings = m_pAppliance->GetWarnings();
-    if (warnings.size() > 0)
-    {
-        foreach (const QString& text, warnings)
-            m_pTextEditWarning->append("- " + text);
-        fWarningsEnabled = true;
-    }
+    /* Check for warnings & if there are one display them: */
+    const QVector<QString> warnings = m_pAppliance->GetWarnings();
+    const bool fWarningsEnabled = warnings.size() > 0;
+    foreach (const QString &strText, warnings)
+        m_pTextEditWarning->append("- " + strText);
     m_pPaneWarning->setVisible(fWarningsEnabled);
 }
@@ -119,3 +126,2 @@
         m_pModel->putBack();
 }
-
Index: trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIApplianceExportEditorWidget.h
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIApplianceExportEditorWidget.h	(revision 91537)
+++ trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIApplianceExportEditorWidget.h	(revision 91538)
@@ -5,5 +5,5 @@
 
 /*
- * Copyright (C) 2009-2020 Oracle Corporation
+ * Copyright (C) 2009-2021 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
@@ -25,4 +25,8 @@
 #include "UIApplianceEditorWidget.h"
 
+/* Forward declarations: */
+class CAppliance;
+
+/** UIApplianceEditorWidget subclass for Export Appliance wizard. */
 class UIApplianceExportEditorWidget: public UIApplianceEditorWidget
 {
@@ -30,12 +34,17 @@
 
 public:
-    UIApplianceExportEditorWidget(QWidget *pParent = NULL);
 
+    /** Constructs widget passing @a pParent to the base-class. */
+    UIApplianceExportEditorWidget(QWidget *pParent = 0);
+
+    /** Inits the widget by creating appliance instance. */
     CAppliance *init();
 
+    /** Populates widget contents. */
     void populate();
+
+    /** Prepares export by pushing edited data back to appliance. */
     void prepareExport();
 };
 
 #endif /* !FEQT_INCLUDED_SRC_widgets_UIApplianceExportEditorWidget_h */
-
