Changeset 22198 in vbox for trunk/src/VBox/Main/xml/Settings.cpp
- Timestamp:
- Aug 12, 2009 10:56:00 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/xml/Settings.cpp
r22197 r22198 726 726 clearDocument(); 727 727 } 728 729 // DHCP servers were introduced with settings version 1.7; if we're loading 730 // from an older version OR this is a fresh install, then add one DHCP server 731 // with default settings 732 if ( (!llDhcpServers.size()) 733 && ( (!pstrFilename) // empty VirtualBox.xml file 734 || (m->sv < SettingsVersion_v1_7) // upgrading from before 1.7 735 ) 736 ) 737 { 738 DHCPServer srv; 739 srv.strNetworkName = 740 #ifdef RT_OS_WINDOWS 741 "HostInterfaceNetworking-VirtualBox Host-Only Ethernet Adapter"; 742 #else 743 "HostInterfaceNetworking-vboxnet0"; 744 #endif 745 srv.strIPAddress = "192.168.56.100"; 746 srv.strIPNetworkMask = "255.255.255.0"; 747 srv.strIPLower = "192.168.56.101"; 748 srv.strIPUpper = "192.168.56.254"; 749 srv.fEnabled = true; 750 llDhcpServers.push_back(srv); 751 } 728 752 } 729 753 … … 1991 2015 } 1992 2016 2017 /** 2018 * Called from Main code if settings are enabled that require a new settings 2019 * version. For example, if someone enables 2D video acceleration, which is a 2020 * new feature with VirtualBox 3.1 and which requires settings version 1.8, 2021 * COMSETTER(Accelerate2DVideoEnabled) calls this method to make sure 2022 * at least settings version 1.8 is enabled. 2023 * 2024 * This allows us to preserve the settings format for older machines and 2025 * break it only if necessary, on a per-machine basis. 2026 * @param sv 2027 */ 2028 void MachineConfigFile::setRequiredSettingsVersion(SettingsVersion_T sv) 2029 { 2030 if (m->sv < sv) 2031 m->sv = sv; 2032 }
Note:
See TracChangeset
for help on using the changeset viewer.