VirtualBox

Changeset 48089 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Aug 27, 2013 4:00:23 PM (11 years ago)
Author:
vboxsync
Message:

FE/Qt: 6909: Medium-enumeration cleanup (part 4).

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

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/globals/VBoxGlobal.h

    r47998 r48089  
    254254    bool findMedium (const CMedium &, UIMedium &) const;
    255255    UIMedium findMedium (const QString &aMediumId) const;
    256 
    257     /** Compact version of #findMediumTo(). Asserts if not found. */
    258     UIMedium getMedium (const CMedium &aObj) const
    259     {
    260         UIMedium medium;
    261         if (!findMedium (aObj, medium))
    262             AssertFailed();
    263         return medium;
    264     }
    265256
    266257    QString openMediumWithFileOpenDialog(UIMediumType mediumType, QWidget *pParent = 0,
  • trunk/src/VBox/Frontends/VirtualBox/src/medium/UIMedium.cpp

    r48061 r48089  
    4242UIMedium& UIMedium::operator=(const UIMedium &other)
    4343{
    44     m_fHidden = other.m_fHidden;
    45     m_fAttachedToHiddenMachinesOnly = other.m_fAttachedToHiddenMachinesOnly;
    46 
    4744    m_medium = other.medium();
    4845    m_type = other.type();
     
    6663    m_strToolTip = other.tip();
    6764
     65    m_fHidden = other.m_fHidden;
     66    m_fAttachedToHiddenMachinesOnly = other.m_fAttachedToHiddenMachinesOnly;
    6867    m_fReadOnly = other.isReadOnly();
    6968    m_fUsedInSnapshots = other.isUsedInSnapshots();
     
    125124void UIMedium::refresh()
    126125{
    127     /* We assume these flags are 'false' by default: */
     126    /* Flags are 'false' by default: */
    128127    m_fHidden = false;
    129128    m_fAttachedToHiddenMachinesOnly = false;
     129    m_fReadOnly = false;
     130    m_fUsedInSnapshots = false;
     131    m_fHostDrive = false;
    130132
    131133    /* Detect basic parameters */
  • trunk/src/VBox/Frontends/VirtualBox/src/medium/UIMedium.h

    r48061 r48089  
    8989        : m_type(UIMediumType_Invalid)
    9090        , m_state(KMediumState_NotCreated)
    91         , m_fReadOnly(false)
    92         , m_fUsedInSnapshots(false)
    9391        , m_pParent(0) { refresh(); }
    9492
     
    108106        , m_type(type)
    109107        , m_state(KMediumState_NotCreated)
    110         , m_fReadOnly(false)
    111         , m_fUsedInSnapshots(false)
    112108        , m_pParent(pParent) { refresh(); }
    113109
     
    121117        , m_type(type)
    122118        , m_state(state)
    123         , m_fReadOnly(false)
    124         , m_fUsedInSnapshots(false)
    125119        , m_pParent(0) { refresh(); }
    126120
     
    267261    QString m_strToolTip;
    268262
     263    bool m_fHidden                       : 1;
     264    bool m_fAttachedToHiddenMachinesOnly : 1;
    269265    bool m_fReadOnly                     : 1;
    270266    bool m_fUsedInSnapshots              : 1;
    271267    bool m_fHostDrive                    : 1;
    272     bool m_fHidden                       : 1;
    273     bool m_fAttachedToHiddenMachinesOnly : 1;
    274268
    275269    QList<QString> m_curStateMachineIds;
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