Changeset 67921 in vbox
- Timestamp:
- Jul 12, 2017 10:04:35 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
r67854 r67921 88 88 m_strLocation = other.location(); 89 89 90 m_uSize = other.sizeInBytes(); 91 m_uLogicalSize = other.logicalSizeInBytes(); 90 92 m_strSize = other.size(); 91 93 m_strLogicalSize = other.logicalSize(); … … 152 154 m_strName = VBoxGlobal::tr("Empty", "medium"); 153 155 m_strLocation = m_strSize = m_strLogicalSize = QString("--"); 156 m_uSize = m_uLogicalSize = 0; 154 157 155 158 /* Reset medium type parameter: */ … … 211 214 if (m_state != KMediumState_Inaccessible && m_state != KMediumState_NotCreated) 212 215 { 213 m_strSize = vboxGlobal().formatSize(m_medium.GetSize()); 216 m_uSize = m_medium.GetSize(); 217 m_strSize = vboxGlobal().formatSize(m_uSize); 214 218 if (m_type == UIMediumType_HardDisk) 215 m_strLogicalSize = vboxGlobal().formatSize(m_medium.GetLogicalSize()); 219 { 220 m_uLogicalSize = m_medium.GetLogicalSize(); 221 m_strLogicalSize = vboxGlobal().formatSize(m_uLogicalSize); 222 } 216 223 else 224 { 225 m_uLogicalSize = m_uSize; 217 226 m_strLogicalSize = m_strSize; 227 } 218 228 } 219 229 } -
trunk/src/VBox/Frontends/VirtualBox/src/medium/UIMedium.h
r67854 r67921 178 178 QString location(bool fNoDiffs = false) const { return fNoDiffs ? root().m_strLocation : m_strLocation; } 179 179 180 /** Returns the medium size in bytes. 181 * @param fNoDiffs @c true to enable user-friendly "don't show diffs" mode. 182 * @note In "don't show diffs" mode, this method returns the size of root in the given hard drive chain. */ 183 qulonglong sizeInBytes(bool fNoDiffs = false) const { return fNoDiffs ? root().m_uSize : m_uSize; } 184 /** Returns the logical medium size in bytes. 185 * @param fNoDiffs @c true to enable user-friendly "don't show diffs" mode. 186 * @note In "don't show diffs" mode, this method returns the size of root in the given hard drive chain. */ 187 qulonglong logicalSizeInBytes(bool fNoDiffs = false) const { return fNoDiffs ? root().m_uLogicalSize : m_uLogicalSize; } 180 188 /** Returns the medium size. 181 189 * @param fNoDiffs @c true to enable user-friendly "don't show diffs" mode. … … 343 351 QString m_strLocation; 344 352 353 /** Holds the medium size in bytes. */ 354 qulonglong m_uSize; 355 /** Holds the logical medium size in bytes. */ 356 qulonglong m_uLogicalSize; 345 357 /** Holds the medium size. */ 346 358 QString m_strSize; 347 /** Holds the medium logicalsize. */359 /** Holds the logical medium size. */ 348 360 QString m_strLogicalSize; 349 361
Note:
See TracChangeset
for help on using the changeset viewer.