VirtualBox

Changeset 95654 in vbox


Ignore:
Timestamp:
Jul 14, 2022 2:10:18 PM (2 years ago)
Author:
vboxsync
Message:

Recording/Main: Added fallback for settings >= 1.14 and < 1.19 when writing settings. Not really needed, but better have it anyway. bugref:9286

File:
1 edited

Legend:

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

    r95644 r95654  
    7575#include <iprt/base64.h>
    7676#include <iprt/cpp/lock.h>
     77#include <iprt/cpp/utils.h>
    7778#include <iprt/cpp/xml.h>
    7879#include <iprt/ctype.h>
     
    63816382            else if (pelmMachineChild->nameEquals("Autostart"))
    63826383                readAutostart(*pelmMachineChild, autostart);
    6383             else if (pelmMachineChild->nameEquals("Recording"))
     6384            else if (pelmMachineChild->nameEquals("Recording")) /* Only exists for settings >= 1.19 (VBox 7.0). */
    63846385                readRecordingSettings(*pelmMachineChild, recordingSettings);
    63856386            else if (pelmMachineChild->nameEquals("Groups"))
     
    83458346    buildDebuggingXML(elmMachine, debugging);
    83468347    buildAutostartXML(elmMachine, autostart);
    8347     buildRecordingXML(elmMachine, recordingSettings);
     8348
     8349    /* Note: Must come *after* buildHardwareXML(), as the "Hardware" branch is needed. */
     8350    if (   m->sv >= SettingsVersion_v1_14
     8351        && m->sv  < SettingsVersion_v1_19) /* < VBox 7.0. */
     8352    {
     8353        xml::ElementNode *pelHardware = unconst(elmMachine.findChildElement("Hardware"));
     8354        if (pelHardware)
     8355            buildRecordingXML(*pelHardware, recordingSettings);
     8356    }
     8357    else if (m->sv >= SettingsVersion_v1_19) /* Now lives outside of "Hardware", in "Machine". */
     8358        buildRecordingXML(elmMachine, recordingSettings);
     8359
    83488360    buildGroupsXML(elmMachine, machineUserData.llGroups);
    83498361}
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