Changeset 69568 in vbox for trunk/src/VBox
- Timestamp:
- Nov 3, 2017 2:56:45 PM (7 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/medium
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/medium/UIMedium.cpp
r69500 r69568 102 102 m_strHardDiskType = other.hardDiskType(); 103 103 m_strHardDiskFormat = other.hardDiskFormat(); 104 m_fHasChildren = other.hasChildren(); 104 105 m_strStorageDetails = other.storageDetails(); 105 106 m_strEncryptionPasswordID = other.encryptionPasswordID(); … … 169 170 m_strHardDiskType = QString(); 170 171 m_strHardDiskFormat = QString(); 172 m_fHasChildren = false; 171 173 m_strStorageDetails = QString(); 172 174 m_strEncryptionPasswordID = QString(); … … 253 255 /* Refresh hard drive format: */ 254 256 m_strHardDiskFormat = m_medium.GetFormat(); 257 258 /* Refresh hard drive parental status: */ 259 m_fHasChildren = m_medium.GetChildren().size(); 255 260 256 261 /* Refresh hard drive storage details: */ -
trunk/src/VBox/Frontends/VirtualBox/src/medium/UIMedium.h
r69500 r69568 217 217 QString hardDiskFormat(bool fNoDiffs = false) const { return fNoDiffs ? root().m_strHardDiskFormat : m_strHardDiskFormat; } 218 218 219 /** Returns whether the hard drive medium disk has childred. 220 * @param fNoDiffs @c true to enable user-friendly "don't show diffs" mode. 221 * @note In "don't show diffs" mode, this method returns the disk format of root in the given hard drive chain. */ 222 bool hasChildren(bool fNoDiffs = false) const { return fNoDiffs ? root().m_fHasChildren : m_fHasChildren; } 223 219 224 /** Returns the hard drive medium storage details. */ 220 225 QString storageDetails() const { return m_strStorageDetails; } … … 379 384 /** Holds the hard drive medium disk format. */ 380 385 QString m_strHardDiskFormat; 386 /** Holds whether the hard drive medium disk has children. */ 387 bool m_fHasChildren; 381 388 /** Holds the hard drive medium storage details. */ 382 389 QString m_strStorageDetails; -
trunk/src/VBox/Frontends/VirtualBox/src/medium/UIMediumDetailsWidget.cpp
r69540 r69568 280 280 /* Configure editor: */ 281 281 m_pLabelType->setBuddy(m_pComboBoxType); 282 m_pComboBoxType->setSizeAdjustPolicy(QComboBox::AdjustToContents); 282 283 m_pComboBoxType->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Fixed); 283 284 connect(m_pComboBoxType, static_cast<void(QComboBox::*)(int)>(&QComboBox::activated), … … 630 631 m_pComboBoxType->addItem(QString(), QVariant::fromValue(KMediumType_Normal)); 631 632 m_pComboBoxType->addItem(QString(), QVariant::fromValue(KMediumType_Immutable)); 632 m_pComboBoxType->addItem(QString(), QVariant::fromValue(KMediumType_Writethrough)); 633 m_pComboBoxType->addItem(QString(), QVariant::fromValue(KMediumType_Shareable)); 633 if (!m_newData.m_fHasChildren) 634 { 635 m_pComboBoxType->addItem(QString(), QVariant::fromValue(KMediumType_Writethrough)); 636 m_pComboBoxType->addItem(QString(), QVariant::fromValue(KMediumType_Shareable)); 637 } 634 638 m_pComboBoxType->addItem(QString(), QVariant::fromValue(KMediumType_MultiAttach)); 635 639 } -
trunk/src/VBox/Frontends/VirtualBox/src/medium/UIMediumDetailsWidget.h
r69526 r69568 122 122 , m_enmType(UIMediumType_Invalid) 123 123 , m_enmVariant(KMediumVariant_Max) 124 , m_fHasChildren(false) 124 125 , m_options(UIDataMediumOptions()) 125 126 , m_details(UIDataMediumDetails()) … … 131 132 , m_enmType(enmType) 132 133 , m_enmVariant(KMediumVariant_Max) 134 , m_fHasChildren(false) 133 135 , m_options(UIDataMediumOptions()) 134 136 , m_details(UIDataMediumDetails()) … … 142 144 && (m_enmType == other.m_enmType) 143 145 && (m_enmVariant == other.m_enmVariant) 146 && (m_fHasChildren == other.m_fHasChildren) 144 147 && (m_options == other.m_options) 145 148 && (m_details == other.m_details) … … 158 161 /** Holds the medium variant. */ 159 162 KMediumVariant m_enmVariant; 163 /** Holds whether medium has children. */ 164 bool m_fHasChildren; 160 165 161 166 /** Holds the medium options. */ -
trunk/src/VBox/Frontends/VirtualBox/src/medium/UIMediumManager.cpp
r69553 r69568 400 400 m_enmType = m_guiMedium.type(); 401 401 m_enmVariant = m_guiMedium.mediumVariant(); 402 m_fHasChildren = m_guiMedium.hasChildren(); 402 403 /* Gather medium options data: */ 403 404 m_options.m_enmType = m_guiMedium.mediumType();
Note:
See TracChangeset
for help on using the changeset viewer.