VirtualBox

Changeset 30008 in vbox for trunk


Ignore:
Timestamp:
Jun 3, 2010 11:50:39 AM (15 years ago)
Author:
vboxsync
Message:

Main/OVF: fix 3.2.2 regression that OVFs with a VM description (annotation) could not be imported

Location:
trunk/src/VBox/Main
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/ApplianceImplImport.cpp

    r29981 r30008  
    11941194                stack.strAudioAdapter = vsdeAudioAdapter.front()->strVboxCurrent;
    11951195
     1196            // for the description of the new machine, always use the OVF entry, the user may have changed it in the import config
     1197            std::list<VirtualSystemDescriptionEntry*> vsdeDescription = vsdescThis->findByType(VirtualSystemDescriptionType_Description);
     1198            if (vsdeDescription.size())
     1199                stack.strDescription = vsdeDescription.front()->strVboxCurrent;
     1200
    11961201            // import vbox:machine or OVF now
    11971202            if (vsdescThis->m->pConfig)
     
    12021207                importMachineGeneric(vsysThis, vsdescThis, pNewMachine, stack);
    12031208
    1204             // for the description of the new machine, always use the OVF entry, the user may have changed it in the import config
    1205             std::list<VirtualSystemDescriptionEntry*> vsdeDescription = vsdescThis->findByType(VirtualSystemDescriptionType_Description);
    1206             if (vsdeDescription.size())
    1207             {
    1208                 const Utf8Str &strDescription = vsdeDescription.front()->strVboxCurrent;
    1209                 rc = pNewMachine->COMSETTER(Description)(Bstr(strDescription));
    1210                 if (FAILED(rc)) throw rc;
    1211             }
    12121209        } // for (it = pAppliance->m->llVirtualSystems.begin() ...
    12131210    }
     
    14541451
    14551452    // set the description
    1456     std::list<VirtualSystemDescriptionEntry*> vsdeDescription = vsdescThis->findByType(VirtualSystemDescriptionType_Description);
    1457     if (vsdeDescription.size())
    1458     {
    1459         const Utf8Str &strDescription = vsdeDescription.front()->strVboxCurrent;
    1460         rc = pNewMachine->COMSETTER(Description)(Bstr(strDescription));
     1453    if (!stack.strDescription.isEmpty())
     1454    {
     1455        rc = pNewMachine->COMSETTER(Description)(Bstr(stack.strDescription));
    14611456        if (FAILED(rc)) throw rc;
    14621457    }
     
    20062001     */
    20072002
    2008 //     std::list<VirtualSystemDescriptionEntry*> llVSDEs;
     2003    config.strDescription = stack.strDescription;
    20092004
    20102005    config.hardwareMachine.cCPUs = stack.cCPUs;
  • trunk/src/VBox/Main/include/ApplianceImplPrivate.h

    r29925 r30008  
    147147    Utf8Str                         strNameVBox;        // VM name
    148148    Utf8Str                         strOsTypeVBox;      // VirtualBox guest OS type as string
     149    Utf8Str                         strDescription;
    149150    uint32_t                        cCPUs;              // CPU count
    150151    bool                            fForceHWVirt;       // if true, we force enabling hardware virtualization
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette