Index: trunk/src/VBox/Main/xml/Settings.cpp
===================================================================
--- trunk/src/VBox/Main/xml/Settings.cpp	(revision 31481)
+++ trunk/src/VBox/Main/xml/Settings.cpp	(revision 31539)
@@ -1718,8 +1718,4 @@
 MachineConfigFile::MachineConfigFile(const Utf8Str *pstrFilename)
     : ConfigFileBase(pstrFilename),
-      fNameSync(true),
-      fTeleporterEnabled(false),
-      uTeleporterPort(0),
-      fRTCUseUTC(false),
       fCurrentStateModified(true),
       fAborted(false)
@@ -1778,16 +1774,7 @@
     return (    (this == &c)
             || (    (uuid                       == c.uuid)
-                 && (strName                    == c.strName)
-                 && (fNameSync                  == c.fNameSync)
-                 && (strDescription             == c.strDescription)
-                 && (strOsType                  == c.strOsType)
+                 && (machineUserData            == c.machineUserData)
                  && (strStateFile               == c.strStateFile)
                  && (uuidCurrentSnapshot        == c.uuidCurrentSnapshot)
-                 && (strSnapshotFolder          == c.strSnapshotFolder)
-                 && (fTeleporterEnabled         == c.fTeleporterEnabled)
-                 && (uTeleporterPort            == c.uTeleporterPort)
-                 && (strTeleporterAddress       == c.strTeleporterAddress)
-                 && (strTeleporterPassword      == c.strTeleporterPassword)
-                 && (fRTCUseUTC                 == c.fRTCUseUTC)
                  // skip fCurrentStateModified!
                  && (RTTimeSpecIsEqual(&timeLastStateChange, &c.timeLastStateChange))
@@ -2536,6 +2523,6 @@
         {
             Utf8Str strLocalOrUTC;
-            fRTCUseUTC =    pelmHwChild->getAttributeValue("localOrUTC", strLocalOrUTC)
-                         && strLocalOrUTC == "UTC";
+            machineUserData.fRTCUseUTC =    pelmHwChild->getAttributeValue("localOrUTC", strLocalOrUTC)
+                                         && strLocalOrUTC == "UTC";
         }
         else if (    (pelmHwChild->nameEquals("UART"))
@@ -3049,23 +3036,22 @@
     Utf8Str strUUID;
     if (    (elmMachine.getAttributeValue("uuid", strUUID))
-         && (elmMachine.getAttributeValue("name", strName))
+         && (elmMachine.getAttributeValue("name", machineUserData.strName))
        )
     {
         parseUUID(uuid, strUUID);
 
-        if (!elmMachine.getAttributeValue("nameSync", fNameSync))
-            fNameSync = true;
+        elmMachine.getAttributeValue("nameSync", machineUserData.fNameSync);
 
         Utf8Str str;
-        elmMachine.getAttributeValue("Description", strDescription);
-
-        elmMachine.getAttributeValue("OSType", strOsType);
+        elmMachine.getAttributeValue("Description", machineUserData.strDescription);
+
+        elmMachine.getAttributeValue("OSType", machineUserData.strOsType);
         if (m->sv < SettingsVersion_v1_5)
-            convertOldOSType_pre1_5(strOsType);
+            convertOldOSType_pre1_5(machineUserData.strOsType);
 
         elmMachine.getAttributeValue("stateFile", strStateFile);
         if (elmMachine.getAttributeValue("currentSnapshot", str))
             parseUUID(uuidCurrentSnapshot, str);
-        elmMachine.getAttributeValue("snapshotFolder", strSnapshotFolder);
+        elmMachine.getAttributeValue("snapshotFolder", machineUserData.strSnapshotFolder);
         if (!elmMachine.getAttributeValue("currentStateModified", fCurrentStateModified))
             fCurrentStateModified = true;
@@ -3103,15 +3089,11 @@
             }
             else if (pelmMachineChild->nameEquals("Description"))
-                strDescription = pelmMachineChild->getValue();
+                machineUserData.strDescription = pelmMachineChild->getValue();
             else if (pelmMachineChild->nameEquals("Teleporter"))
             {
-                if (!pelmMachineChild->getAttributeValue("enabled", fTeleporterEnabled))
-                    fTeleporterEnabled = false;
-                if (!pelmMachineChild->getAttributeValue("port", uTeleporterPort))
-                    uTeleporterPort = 0;
-                if (!pelmMachineChild->getAttributeValue("address", strTeleporterAddress))
-                    strTeleporterAddress = "";
-                if (!pelmMachineChild->getAttributeValue("password", strTeleporterPassword))
-                    strTeleporterPassword = "";
+                pelmMachineChild->getAttributeValue("enabled", machineUserData.fTeleporterEnabled);
+                pelmMachineChild->getAttributeValue("port", machineUserData.uTeleporterPort);
+                pelmMachineChild->getAttributeValue("address", machineUserData.strTeleporterAddress);
+                pelmMachineChild->getAttributeValue("password", machineUserData.strTeleporterPassword);
             }
         }
@@ -3574,5 +3556,5 @@
     {
         xml::ElementNode *pelmRTC = pelmHardware->createChild("RTC");
-        pelmRTC->setAttribute("localOrUTC", fRTCUseUTC ? "UTC" : "local");
+        pelmRTC->setAttribute("localOrUTC", machineUserData.fRTCUseUTC ? "UTC" : "local");
     }
 
@@ -3782,6 +3764,5 @@
 
         xml::ElementNode *pelmController = pelmStorageControllers->createChild("StorageController");
-        com::Utf8Str name = sc.strName.raw();
-        //
+        com::Utf8Str name = sc.strName;
         if (m->sv < SettingsVersion_v1_8)
         {
@@ -3984,10 +3965,10 @@
 
     elmMachine.setAttribute("uuid", uuid.toStringCurly());
-    elmMachine.setAttribute("name", strName);
-    if (!fNameSync)
-        elmMachine.setAttribute("nameSync", fNameSync);
-    if (strDescription.length())
-        elmMachine.createChild("Description")->addContent(strDescription);
-    elmMachine.setAttribute("OSType", strOsType);
+    elmMachine.setAttribute("name", machineUserData.strName);
+    if (!machineUserData.fNameSync)
+        elmMachine.setAttribute("nameSync", machineUserData.fNameSync);
+    if (machineUserData.strDescription.length())
+        elmMachine.createChild("Description")->addContent(machineUserData.strDescription);
+    elmMachine.setAttribute("OSType", machineUserData.strOsType);
     if (strStateFile.length())
         elmMachine.setAttribute("stateFile", strStateFile);
@@ -3995,6 +3976,6 @@
          && !uuidCurrentSnapshot.isEmpty())
         elmMachine.setAttribute("currentSnapshot", uuidCurrentSnapshot.toStringCurly());
-    if (strSnapshotFolder.length())
-        elmMachine.setAttribute("snapshotFolder", strSnapshotFolder);
+    if (machineUserData.strSnapshotFolder.length())
+        elmMachine.setAttribute("snapshotFolder", machineUserData.strSnapshotFolder);
     if (!fCurrentStateModified)
         elmMachine.setAttribute("currentStateModified", fCurrentStateModified);
@@ -4003,16 +3984,16 @@
         elmMachine.setAttribute("aborted", fAborted);
     if (    m->sv >= SettingsVersion_v1_9
-        &&  (   fTeleporterEnabled
-            ||  uTeleporterPort
-            ||  !strTeleporterAddress.isEmpty()
-            ||  !strTeleporterPassword.isEmpty()
+        &&  (   machineUserData.fTeleporterEnabled
+            ||  machineUserData.uTeleporterPort
+            ||  !machineUserData.strTeleporterAddress.isEmpty()
+            ||  !machineUserData.strTeleporterPassword.isEmpty()
             )
        )
     {
         xml::ElementNode *pelmTeleporter = elmMachine.createChild("Teleporter");
-        pelmTeleporter->setAttribute("enabled", fTeleporterEnabled);
-        pelmTeleporter->setAttribute("port", uTeleporterPort);
-        pelmTeleporter->setAttribute("address", strTeleporterAddress);
-        pelmTeleporter->setAttribute("password", strTeleporterPassword);
+        pelmTeleporter->setAttribute("enabled", machineUserData.fTeleporterEnabled);
+        pelmTeleporter->setAttribute("port", machineUserData.uTeleporterPort);
+        pelmTeleporter->setAttribute("address", machineUserData.strTeleporterAddress);
+        pelmTeleporter->setAttribute("password", machineUserData.strTeleporterPassword);
     }
 
@@ -4244,5 +4225,5 @@
             || (hardwareMachine.fPageFusionEnabled)
                 // and CPU hotplug, RTC timezone control, HID type and HPET
-            || fRTCUseUTC
+            || machineUserData.fRTCUseUTC
             || hardwareMachine.fCpuHotPlug
             || hardwareMachine.pointingHidType != PointingHidType_PS2Mouse
@@ -4308,8 +4289,8 @@
          && (    (hardwareMachine.firmwareType >= FirmwareType_EFI)
               || (hardwareMachine.fHardwareVirtExclusive != HWVIRTEXCLUSIVEDEFAULT)
-              || fTeleporterEnabled
-              || uTeleporterPort
-              || !strTeleporterAddress.isEmpty()
-              || !strTeleporterPassword.isEmpty()
+              || machineUserData.fTeleporterEnabled
+              || machineUserData.uTeleporterPort
+              || !machineUserData.strTeleporterAddress.isEmpty()
+              || !machineUserData.strTeleporterPassword.isEmpty()
               || !hardwareMachine.uuid.isEmpty()
             )
