VirtualBox

Changeset 90452 in vbox for trunk


Ignore:
Timestamp:
Aug 1, 2021 9:03:24 AM (3 years ago)
Author:
vboxsync
Message:

FE/Qt: bugref:10067: A fix for r145856, for UICommon::sltHandleMediumCreated to make sure actual medium type is properly fetched.

File:
1 edited

Legend:

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

    r90375 r90452  
    41444144void UICommon::sltHandleMediumCreated(const CMedium &comMedium)
    41454145{
    4146     /* Make sure we cached created medium in GUI: */
    4147     createMedium(UIMedium(comMedium, UIMediumDeviceType_HardDisk, KMediumState_Created));
     4146    /* Acquire device type: */
     4147    const KDeviceType enmDeviceType = comMedium.GetDeviceType();
     4148    if (!comMedium.isOk())
     4149        msgCenter().cannotAcquireMediumAttribute(comMedium);
     4150    else
     4151    {
     4152        /* Convert to medium type: */
     4153        const UIMediumDeviceType enmMediumType = mediumTypeToLocal(enmDeviceType);
     4154
     4155        /* Make sure we cached created medium in GUI: */
     4156        createMedium(UIMedium(comMedium, enmMediumType, KMediumState_Created));
     4157    }
    41484158}
    41494159
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