VirtualBox

Changeset 56100 in vbox for trunk/src/VBox/Main/xml


Ignore:
Timestamp:
May 27, 2015 1:43:12 PM (10 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
100624
Message:

pr6522. added check of settings version.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/xml/Settings.cpp

    r56088 r56100  
    26232623{
    26242624
    2625     // get all properties
    2626     xml::NodesLoop nl1(elmAudioAdapter, "Property");
    2627     const xml::ElementNode *pelmModeChild;
    2628     while ((pelmModeChild = nl1.forAllNodes()))
    2629     {
    2630         Utf8Str strPropName, strPropValue;
    2631         if (   pelmModeChild->getAttributeValue("name", strPropName)
    2632             && pelmModeChild->getAttributeValue("value", strPropValue) )
    2633             aa.properties[strPropName] = strPropValue;
    2634         else
    2635             throw ConfigFileError(this, pelmModeChild, N_("Required AudioAdapter/Property/@name or @value attribute "
    2636                                                           "is missing"));
     2625    if (m->sv >= SettingsVersion_v1_15)
     2626    {
     2627        // get all properties
     2628        xml::NodesLoop nl1(elmAudioAdapter, "Property");
     2629        const xml::ElementNode *pelmModeChild;
     2630        while ((pelmModeChild = nl1.forAllNodes()))
     2631        {
     2632            Utf8Str strPropName, strPropValue;
     2633            if (   pelmModeChild->getAttributeValue("name", strPropName)
     2634                && pelmModeChild->getAttributeValue("value", strPropValue) )
     2635                aa.properties[strPropName] = strPropValue;
     2636            else
     2637                throw ConfigFileError(this, pelmModeChild, N_("Required AudioAdapter/Property/@name or @value attribute "
     2638                                                              "is missing"));
     2639        }
    26372640    }
    26382641
     
    47464749    pelmAudio->setAttribute("enabled", hw.audioAdapter.fEnabled);
    47474750
    4748     if (hw.audioAdapter.properties.size() > 0)
     4751    if (m->sv >= SettingsVersion_v1_15 && hw.audioAdapter.properties.size() > 0)
    47494752    {
    47504753        for (StringsMap::const_iterator it = hw.audioAdapter.properties.begin();
Note: See TracChangeset for help on using the changeset viewer.

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