VirtualBox

Changeset 68045 in vbox for trunk/src


Ignore:
Timestamp:
Jul 19, 2017 12:19:01 PM (8 years ago)
Author:
vboxsync
Message:

FE/Qt: bugref:8400: Caching medium description in UIMedium more carefully (s.a. r116968).

File:
1 edited

Legend:

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

    r67966 r68045  
    204204        m_fHostDrive = m_medium.GetHostDrive();
    205205
     206        /* Refresh medium description: */
     207        m_strDescription = m_medium.GetDescription();
     208
    206209        /* Refresh medium name: */
    207210        if (!m_fHostDrive)
    208211            m_strName = m_medium.GetName();
    209         else if (m_medium.GetDescription().isEmpty())
     212        else if (m_strDescription.isEmpty())
    210213            m_strName = VBoxGlobal::tr("Host Drive '%1'", "medium").arg(QDir::toNativeSeparators(m_medium.GetLocation()));
    211214        else
    212             m_strName = VBoxGlobal::tr("Host Drive %1 (%2)", "medium").arg(m_medium.GetDescription(), m_medium.GetName());
    213         /* Refresh medium location/description: */
     215            m_strName = VBoxGlobal::tr("Host Drive %1 (%2)", "medium").arg(m_strDescription, m_medium.GetName());
     216        /* Refresh medium location: */
    214217        if (!m_fHostDrive)
    215         {
    216218            m_strLocation = QDir::toNativeSeparators(m_medium.GetLocation());
    217             m_strDescription = m_medium.GetDescription();
    218         }
    219219
    220220        /* Refresh medium size and logical size: */
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