Changeset 25672 in vbox for trunk/src/VBox/Main/xml
- Timestamp:
- Jan 6, 2010 9:23:07 PM (15 years ago)
- svn:sync-xref-src-repo-rev:
- 56387
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/xml/Settings.cpp
r25589 r25672 29 29 * 30 30 * 3) In the settings writer method, write the setting _only_ if the current settings 31 * version (stored in m->sv) is high enough. That is, for VirtualBox 3. 1, write it32 * only if (m->sv >= SettingsVersion_v1_ 9).31 * version (stored in m->sv) is high enough. That is, for VirtualBox 3.2, write it 32 * only if (m->sv >= SettingsVersion_v1_10). 33 33 * 34 34 * 4) In MachineConfigFile::bumpSettingsVersionIfNeeded(), check if the new setting has … … 42 42 43 43 /* 44 * Copyright (C) 2007-20 09Sun Microsystems, Inc.44 * Copyright (C) 2007-2010 Sun Microsystems, Inc. 45 45 * 46 46 * This file is part of VirtualBox Open Source Edition (OSE), as … … 279 279 else if (ulMinor == 9) 280 280 m->sv = SettingsVersion_v1_9; 281 else if (ulMinor > 9) 281 else if (ulMinor == 10) 282 m->sv = SettingsVersion_v1_10; 283 else if (ulMinor > 10) 282 284 m->sv = SettingsVersion_Future; 283 285 } … … 298 300 { 299 301 m->strSettingsVersionFull = VBOX_XML_VERSION_FULL; 300 m->sv = SettingsVersion_v1_ 9;302 m->sv = SettingsVersion_v1_10; 301 303 } 302 304 } … … 545 547 case SettingsVersion_v1_8: 546 548 pcszVersion = "1.8"; 547 break;549 break; 548 550 549 551 case SettingsVersion_v1_9: 552 pcszVersion = "1.9"; 553 break; 554 555 case SettingsVersion_v1_10: 550 556 case SettingsVersion_Future: // can be set if this code runs on XML files that were created by a future version of VBox; 551 557 // in that case, downgrade to current version when writing since we can't write future versions... 552 pcszVersion = "1. 9";553 m->sv = SettingsVersion_v1_ 9;554 break;558 pcszVersion = "1.10"; 559 m->sv = SettingsVersion_v1_10; 560 break; 555 561 556 562 default: … … 558 564 pcszVersion = "1.7"; 559 565 m->sv = SettingsVersion_v1_7; 560 break;566 break; 561 567 } 562 568 … … 1775 1781 else if (pelmHwChild->nameEquals("Network")) 1776 1782 readNetworkAdapters(*pelmHwChild, hw.llNetworkAdapters); 1783 else if (pelmHwChild->nameEquals("RTC")) 1784 { 1785 Utf8Str strLocalOrUTC; 1786 fRTCUseUTC = pelmHwChild->getAttributeValue("localOrUTC", strLocalOrUTC) 1787 && strLocalOrUTC == "UTC"; 1788 } 1777 1789 else if ( (pelmHwChild->nameEquals("UART")) 1778 1790 || (pelmHwChild->nameEquals("Uart")) // used before 1.3 … … 1780 1792 readSerialPorts(*pelmHwChild, hw.llSerialPorts); 1781 1793 else if ( (pelmHwChild->nameEquals("LPT")) 1782 || (pelmHwChild->nameEquals("Lpt"))// used before 1.31794 || (pelmHwChild->nameEquals("Lpt")) // used before 1.3 1783 1795 ) 1784 1796 readParallelPorts(*pelmHwChild, hw.llParallelPorts); … … 2411 2423 fTeleporterEnabled(false), 2412 2424 uTeleporterPort(0), 2425 fRTCUseUTC(false), 2413 2426 fCurrentStateModified(true), 2414 2427 fAborted(false) … … 2766 2779 pelmAudio->setAttribute("controller", (hw.audioAdapter.controllerType == AudioControllerType_SB16) ? "SB16" : "AC97"); 2767 2780 2781 if ( m->sv >= SettingsVersion_v1_10 2782 && fRTCUseUTC) 2783 { 2784 xml::ElementNode *pelmRTC = pelmHardware->createChild("RTC"); 2785 pelmRTC->setAttribute("localOrUTC", fRTCUseUTC ? "UTC" : "local"); 2786 } 2787 2768 2788 const char *pcszDriver; 2769 2789 switch (hw.audioAdapter.driverType) … … 3069 3089 m->sv = SettingsVersion_v1_9; 3070 3090 } 3091 3092 if ( m->sv < SettingsVersion_v1_10 3093 && ( fRTCUseUTC 3094 ) 3095 ) 3096 m->sv = SettingsVersion_v1_10; 3071 3097 } 3072 3098
Note:
See TracChangeset
for help on using the changeset viewer.