VirtualBox

Changeset 80888 in vbox for trunk


Ignore:
Timestamp:
Sep 18, 2019 12:51:11 PM (5 years ago)
Author:
vboxsync
Message:

FE/Qt: bugref:7127: A bit of cleanup for media enumeration status code.

Location:
trunk/src/VBox/Frontends/VirtualBox/src
Files:
4 edited

Legend:

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

    r80884 r80888  
    26112611}
    26122612
     2613bool UICommon::isFullMediumEnumerationRequested() const
     2614{
     2615    /* Redirect request to medium-enumerator: */
     2616    return    m_pMediumEnumerator
     2617           && m_pMediumEnumerator->isFullMediumEnumerationRequested();
     2618}
     2619
    26132620bool UICommon::isMediumEnumerationInProgress() const
    26142621{
     
    26162623    return    m_pMediumEnumerator
    26172624           && m_pMediumEnumerator->isMediumEnumerationInProgress();
    2618 }
    2619 
    2620 bool UICommon::isFullMediumEnumerationRequested() const
    2621 {
    2622     /* Redirect request to medium-enumerator: */
    2623     return    m_pMediumEnumerator
    2624            && m_pMediumEnumerator->isFullMediumEnumerationRequested();
    26252625}
    26262626
  • trunk/src/VBox/Frontends/VirtualBox/src/globals/UICommon.h

    r80884 r80888  
    488488        /** Calls refresh for each medium which has been already enumerated. */
    489489        void refreshMedia();
    490         /** Returns whether medium-enumeration is in progress. */
    491         bool isMediumEnumerationInProgress() const;
    492490        /** Returns whether full medium-enumeration is requested. */
    493491        bool isFullMediumEnumerationRequested() const;
     492        /** Returns whether any medium-enumeration is in progress. */
     493        bool isMediumEnumerationInProgress() const;
    494494        /** Returns enumerated medium with certain @a uMediumID. */
    495495        UIMedium medium(const QUuid &uMediumID) const;
  • trunk/src/VBox/Frontends/VirtualBox/src/medium/UIMediumEnumerator.cpp

    r80884 r80888  
    9797
    9898UIMediumEnumerator::UIMediumEnumerator()
    99     : m_fMediumEnumerationInProgress(false)
    100     , m_fMediumEnumerationRequested(false)
     99    : m_fFullMediumEnumerationRequested(false)
     100    , m_fMediumEnumerationInProgress(false)
    101101{
    102102    /* Allow UIMedium to be used in inter-thread signals: */
     
    175175    if (comMedia.isEmpty())
    176176    {
    177         m_fMediumEnumerationRequested = true;
     177        m_fFullMediumEnumerationRequested = true;
    178178        addMediaToMap(uiCommon().virtualBox().GetHardDisks(), media);
    179179        addMediaToMap(uiCommon().host().GetDVDDrives(), media);
     
    184184    else
    185185    {
    186         m_fMediumEnumerationRequested = false;
     186        m_fFullMediumEnumerationRequested = false;
    187187        addMediaToMap(uiCommon().host().GetDVDDrives(), media);
    188188        addMediaToMap(uiCommon().virtualBox().GetDVDImages(), media);
  • trunk/src/VBox/Frontends/VirtualBox/src/medium/UIMediumEnumerator.h

    r80884 r80888  
    7676    void createMedium(const UIMedium &guiMedium);
    7777
    78     /** Returns whether consolidated medium-enumeration process is in progress. */
     78    /** Returns whether full consolidated medium-enumeration process is requested. */
     79    bool isFullMediumEnumerationRequested() const { return m_fFullMediumEnumerationRequested; }
     80    /** Returns whether any consolidated medium-enumeration process is in progress. */
    7981    bool isMediumEnumerationInProgress() const { return m_fMediumEnumerationInProgress; }
    80     /** Returns whether full consolidated medium-enumeration process is requested. */
    81     bool isFullMediumEnumerationRequested() const { return m_fMediumEnumerationRequested; }
    8282    /** Makes a request to enumerate specified @a comMedia.
    8383      * @note  Previous map will be replaced with the new one, values present in both
     
    155155    void enumerateAllMediaOfMediumWithId(const QUuid &uMediumId, QList<QUuid> &result);
    156156
    157     /** Holds whether consolidated medium-enumeration process is in progress. */
     157    /** Holds whether full consolidated medium-enumeration process is requested. */
     158    bool  m_fFullMediumEnumerationRequested;
     159    /** Holds whether any consolidated medium-enumeration process is in progress. */
    158160    bool  m_fMediumEnumerationInProgress;
    159     /** Holds whether full consolidated medium-enumeration process is requested. */
    160     bool  m_fMediumEnumerationRequested;
    161161
    162162    /** Holds a set of current medium-enumeration tasks. */
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