Changeset 67946 in vbox
- Timestamp:
- Jul 13, 2017 9:50:52 AM (7 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/medium
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/medium/UIMedium.cpp
r67921 r67946 42 42 , m_state(KMediumState_NotCreated) 43 43 , m_enmMediumType(KMediumType_Max) 44 , m_enmMediumVariant(KMediumVariant_Max) 44 45 { 45 46 refresh(); … … 51 52 , m_state(KMediumState_NotCreated) 52 53 , m_enmMediumType(KMediumType_Max) 54 , m_enmMediumVariant(KMediumVariant_Max) 53 55 { 54 56 refresh(); … … 60 62 , m_state(state) 61 63 , m_enmMediumType(KMediumType_Max) 64 , m_enmMediumVariant(KMediumVariant_Max) 62 65 { 63 66 refresh(); … … 94 97 95 98 m_enmMediumType = other.mediumType(); 99 m_enmMediumVariant = other.mediumVariant(); 96 100 97 101 m_strHardDiskType = other.hardDiskType(); … … 156 160 m_uSize = m_uLogicalSize = 0; 157 161 158 /* Reset medium type parameter: */162 /* Reset medium type & variant parameter: */ 159 163 m_enmMediumType = KMediumType_Max; 164 m_enmMediumVariant = KMediumVariant_Max; 160 165 161 166 /* Reset hard drive related parameters: */ … … 229 234 } 230 235 231 /* Refresh medium type : */236 /* Refresh medium type & variant: */ 232 237 m_enmMediumType = m_medium.GetType(); 238 qlonglong iMediumVariant = 0; 239 foreach (const KMediumVariant &enmVariant, m_medium.GetVariant()) 240 iMediumVariant |= enmVariant; 241 m_enmMediumVariant = (KMediumVariant)iMediumVariant; 233 242 234 243 /* For hard drive medium: */ … … 241 250 242 251 /* Refresh hard drive storage details: */ 243 qlonglong iMediumVariant = 0; 244 foreach (const KMediumVariant &enmVariant, m_medium.GetVariant()) 245 iMediumVariant |= enmVariant; 246 m_strStorageDetails = gpConverter->toString((KMediumVariant)iMediumVariant); 252 m_strStorageDetails = gpConverter->toString(m_enmMediumVariant); 247 253 248 254 /* Check whether this is read-only hard drive: */ -
trunk/src/VBox/Frontends/VirtualBox/src/medium/UIMedium.h
r67921 r67946 199 199 * @note In "don't show diffs" mode, this method returns the disk type of root in the given hard drive chain. */ 200 200 KMediumType mediumType(bool fNoDiffs = false) const { return fNoDiffs ? root().m_enmMediumType : m_enmMediumType; } 201 /** Returns the medium disk variant. 202 * @param fNoDiffs @c true to enable user-friendly "don't show diffs" mode. 203 * @note In "don't show diffs" mode, this method returns the disk variant of root in the given hard drive chain. */ 204 KMediumVariant mediumVariant(bool fNoDiffs = false) const { return fNoDiffs ? root().m_enmMediumVariant : m_enmMediumVariant; } 201 205 202 206 /** Returns the hard drive medium disk type. … … 362 366 /** Holds the medium disk type. */ 363 367 KMediumType m_enmMediumType; 368 /** Holds the medium disk variant. */ 369 KMediumVariant m_enmMediumVariant; 364 370 365 371 /** Holds the hard drive medium disk type. */
Note:
See TracChangeset
for help on using the changeset viewer.