VirtualBox

Ignore:
Timestamp:
Dec 10, 2010 1:14:00 PM (14 years ago)
Author:
vboxsync
Message:

FE/Qt: VBoxGlobal extended with few medium-type conversion methods commonly used.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsStorage.cpp

    r34946 r34947  
    3636#include <QTimer>
    3737#include <QCommonStyle>
    38 
    39 /* Type converters */
    40 VBoxDefs::MediumType typeToLocal (KDeviceType aType)
    41 {
    42     VBoxDefs::MediumType result = VBoxDefs::MediumType_Invalid;
    43     switch (aType)
    44     {
    45         case KDeviceType_HardDisk:
    46             result = VBoxDefs::MediumType_HardDisk;
    47             break;
    48         case KDeviceType_DVD:
    49             result = VBoxDefs::MediumType_DVD;
    50             break;
    51         case KDeviceType_Floppy:
    52             result = VBoxDefs::MediumType_Floppy;
    53             break;
    54         default:
    55             AssertMsgFailed (("Incorrect medium type!\n"));
    56             break;
    57     }
    58     return result;
    59 }
    60 
    6138
    6239QString compressText (const QString &aText)
     
    23212298                        break;
    23222299                }
    2323                 m_pMediumIdHolder->setType(typeToLocal(device));
     2300                m_pMediumIdHolder->setType(vboxGlobal().mediumTypeToLocal(device));
    23242301                m_pMediumIdHolder->setId(mStorageModel->data(index, StorageModel::R_AttMediumId).toString());
    23252302
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