VirtualBox

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


Ignore:
Timestamp:
Aug 20, 2013 2:08:20 PM (12 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
88224
Message:

Main/xml/Settings.cpp: the convention for attributes is that they start with a lowercase letter, and putting very long ones last is helpful as it doesn't need checking what's behind it in the line.

File:
1 edited

Legend:

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

    r47503 r47917  
    38103810        Utf8Str str;
    38113811        elmMachine.getAttributeValue("Description", machineUserData.strDescription);
    3812         elmMachine.getAttributeValue("Icon", machineUserData.ovIcon);
    3813 
    38143812        elmMachine.getAttributeValue("OSType", machineUserData.strOsType);
    38153813        if (m->sv < SettingsVersion_v1_5)
     
    38303828        if (elmMachine.getAttributeValue("aborted", fAborted))
    38313829            fAborted = true;
     3830
     3831        elmMachine.getAttributeValue("icon", machineUserData.ovIcon);
    38323832
    38333833        // parse Hardware before the other elements because other things depend on it
     
    51015101    if (machineUserData.strDescription.length())
    51025102        elmMachine.createChild("Description")->addContent(machineUserData.strDescription);
    5103     if (machineUserData.ovIcon.length())
    5104         elmMachine.setAttribute("Icon", machineUserData.ovIcon);
    51055103    elmMachine.setAttribute("OSType", machineUserData.strOsType);
    51065104    if (    strStateFile.length()
     
    51215119    if (fAborted)
    51225120        elmMachine.setAttribute("aborted", fAborted);
     5121    // Please keep the icon last so that one doesn't have to check if there
     5122    // is anything in the line after this very long attribute in the XML.
     5123    if (machineUserData.ovIcon.length())
     5124        elmMachine.setAttribute("icon", machineUserData.ovIcon);
    51235125    if (    m->sv >= SettingsVersion_v1_9
    51245126        &&  (   machineUserData.fTeleporterEnabled
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