Changeset 55545 in vbox for trunk/src/VBox/Frontends/VirtualBox
- Timestamp:
- Apr 30, 2015 11:26:20 AM (10 years ago)
- svn:sync-xref-src-repo-rev:
- 99911
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/medium
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/medium/UIMedium.cpp
r55104 r55545 104 104 m_fUsedInSnapshots = other.isUsedInSnapshots(); 105 105 m_fHostDrive = other.isHostDrive(); 106 m_fEncrypted = other.isEncrypted(); 106 107 107 108 return *this; … … 170 171 m_fUsedInSnapshots = false; 171 172 m_fHostDrive = false; 173 m_fEncrypted = false; 172 174 173 175 /* For non NULL medium: */ … … 241 243 m_strRootId = parentMedium.GetId(); 242 244 parentMedium = parentMedium.GetParent(); 245 } 246 247 /* Check whether this medium is encrypted: */ 248 if (m_strRootId != m_strId) 249 m_fEncrypted = root().isEncrypted(); 250 else 251 { 252 QString strCipher; 253 CMedium medium(m_medium); 254 medium.GetEncryptionSettings(strCipher); 255 m_fEncrypted = medium.isOk(); 243 256 } 244 257 } … … 474 487 strDetails = QString("%1, ").arg(rootMedium.m_strHardDiskType); 475 488 } 489 490 /* Add encryption status: */ 491 if (m_fEncrypted) 492 strDetails += QString("%1, ").arg(VBoxGlobal::tr("Encrypted", "medium")); 476 493 } 477 494 -
trunk/src/VBox/Frontends/VirtualBox/src/medium/UIMedium.h
r55401 r55545 264 264 bool isHostDrive() const { return m_fHostDrive; } 265 265 266 /** Returns whether this medium is encrypted. */ 267 bool isEncrypted() const { return m_fEncrypted; } 268 266 269 /** Returns whether this medium is attached to any VM (in the current state or in a snapshot) in which case 267 270 * #usage() will contain a string with comma-separated VM names (with snapshot names, if any, in parenthesis). */ … … 357 360 /** Holds whether this medium corresponds to real host drive. */ 358 361 bool m_fHostDrive : 1; 362 /** Holds whether this medium is encrypted. */ 363 bool m_fEncrypted : 1; 359 364 360 365 /** Holds the NULL medium ID. */
Note:
See TracChangeset
for help on using the changeset viewer.