VirtualBox

Ignore:
Timestamp:
Feb 7, 2011 4:43:02 PM (14 years ago)
Author:
vboxsync
Message:

FE/Qt4: upgrade path for the host key

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/VBoxGlobalSettings.cpp

    r35730 r35879  
    154154void VBoxGlobalSettings::load (CVirtualBox &vbox)
    155155{
    156     for (size_t i = 0; i < SIZEOF_ARRAY (gPropertyMap); i++)
    157     {
    158         QString value = vbox.GetExtraData (gPropertyMap [i].publicName);
     156    for (size_t i = 0; i < SIZEOF_ARRAY(gPropertyMap); i++)
     157    {
     158        QString value = vbox.GetExtraData(gPropertyMap[i].publicName);
    159159        if (!vbox.isOk())
    160160            return;
    161         // empty value means the key is absent. it is ok, the default will apply
     161        /* Check for the host key upgrade path. */
     162        if (   value.isEmpty()
     163            && QString(gPropertyMap[i].publicName) == "GUI/Input/HostCombo")
     164            value = vbox.GetExtraData("GUI/Input/HostKey");
     165        /* Empty value means the key is absent. It is OK, the default will
     166         * apply. */
    162167        if (value.isEmpty())
    163168            continue;
    164         // try to set the property validating it against rx
    165         setPropertyPrivate (i, value);
     169        /* Try to set the property validating it against rx. */
     170        setPropertyPrivate(i, value);
    166171        if (!(*this))
    167172            break;
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