VirtualBox

Changeset 47503 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Aug 1, 2013 9:01:40 AM (11 years ago)
Author:
vboxsync
Message:

Main: bump settings version if NAT networks are defined

File:
1 edited

Legend:

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

    r47401 r47503  
    14971497}
    14981498
     1499void MainConfigFile::bumpSettingsVersionIfNeeded()
     1500{
     1501    if (m->sv < SettingsVersion_v1_14)
     1502    {
     1503        // VirtualBox 4.3 adds NAT networks.
     1504        if (   !llNATNetworks.empty())
     1505            m->sv = SettingsVersion_v1_14;
     1506    }
     1507}
     1508
    14991509/**
    15001510 * Called from the IVirtualBox interface to write out VirtualBox.xml. This
     
    15031513void MainConfigFile::write(const com::Utf8Str strFilename)
    15041514{
     1515    bumpSettingsVersionIfNeeded();
     1516
    15051517    m->strFilename = strFilename;
    15061518    createStubDocument();
     
    15921604     }
    15931605
    1594     /* TODO: bump main version ? */
    15951606    xml::ElementNode *pelmNATNetworks;
    15961607    /* don't create entry if no NAT networks are registered. */
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