Changeset 101637 in vbox for trunk/src/VBox/Frontends/VirtualBox
- Timestamp:
- Oct 27, 2023 4:17:24 PM (16 months ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/settings/editors
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/settings/editors/UINetworkAttachmentEditor.cpp
r101563 r101637 198 198 #endif /* VBOX_WITH_VMNET */ 199 199 200 void UINetworkAttachmentEditor::filterOut(bool fExpertMode, const QString &strFilter) 201 { 202 /* Call to base-class: */ 203 UIEditor::filterOut(fExpertMode, strFilter); 204 205 /* Repopulate type combo to make 206 * sure excessive types removed: */ 207 populateTypeCombo(); 208 } 209 200 210 void UINetworkAttachmentEditor::retranslateUi() 201 211 { … … 358 368 CSystemProperties comProperties = uiCommon().virtualBox().GetSystemProperties(); 359 369 QVector<KNetworkAttachmentType> supportedTypes = comProperties.GetSupportedNetworkAttachmentTypes(); 370 /* Filter out types unrelated to current experience mode: */ 371 if (!m_fInExpertMode) 372 { 373 /* Keep only allowed types but in the same order they came from CSystemProperties: */ 374 const QVector<KNetworkAttachmentType> allowedTypes = QVector<KNetworkAttachmentType>() 375 << KNetworkAttachmentType_NAT 376 << KNetworkAttachmentType_Bridged; 377 QVector<KNetworkAttachmentType> resultingTypes; 378 foreach (KNetworkAttachmentType enmType, supportedTypes) 379 if (allowedTypes.contains(enmType)) 380 resultingTypes << enmType; 381 supportedTypes = resultingTypes; 382 } 360 383 /* Take currently requested type into account if it's different from initial one: */ 361 384 if (!supportedTypes.contains(m_enmType) && m_enmType != KNetworkAttachmentType_Max) -
trunk/src/VBox/Frontends/VirtualBox/src/settings/editors/UINetworkAttachmentEditor.h
r101011 r101637 102 102 protected: 103 103 104 /** Filters out contents. 105 * @param fExpertMode Brings whether settings expert mode is requested. 106 * @param strFilter Brings the filter description should correspond to. */ 107 virtual void filterOut(bool fExpertMode, const QString &strFilter) RT_OVERRIDE; 108 104 109 /** Handles translation event. */ 105 110 virtual void retranslateUi() RT_OVERRIDE;
Note:
See TracChangeset
for help on using the changeset viewer.