Changeset 78540 in vbox for trunk/src/VBox
- Timestamp:
- May 16, 2019 9:57:17 AM (6 years ago)
- svn:sync-xref-src-repo-rev:
- 130585
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsNetwork.cpp
r78519 r78540 122 122 /** Holds whether the network adapter is connected. */ 123 123 bool m_fCableConnected; 124 /** Holds the list of restricted network attachment types. */ 125 UIExtraDataMetaDefs::DetailsElementOptionTypeNetwork m_enmRestrictedNetworkAttachmentTypes; 124 126 }; 125 127 … … 220 222 QString m_strNATNetworkName; 221 223 UIPortForwardingDataList m_portForwardingRules; 224 /** Holds the list of restricted network attachment types. */ 225 UIExtraDataMetaDefs::DetailsElementOptionTypeNetwork m_enmRestrictedNetworkAttachmentTypes; 222 226 }; 223 227 … … 304 308 for (int i = 0; i < adapterCache.childCount(); ++i) 305 309 m_portForwardingRules << adapterCache.child(i).base(); 310 /* Cache the restricted metwork attachment types to avoid re-reading them from the extra data: */ 311 m_enmRestrictedNetworkAttachmentTypes = oldAdapterData.m_enmRestrictedNetworkAttachmentTypes; 312 /* Re-apply language settings: */ 313 retranslateUi(); 306 314 } 307 315 … … 783 791 784 792 /* Populate attachments: */ 785 const UIExtraDataMetaDefs::DetailsElementOptionTypeNetwork enmRestrictedNetworkAttachmentTypes =786 gEDataManager->restrictedNetworkAttachmentTypes();787 793 int iAttachmentTypeIndex = 0; 788 794 /* We want some hardcoded order, so prepare a list of enum values: */ … … 794 800 { 795 801 const KNetworkAttachmentType enmType = attachmentTypes.at(i); 796 if ( enmRestrictedNetworkAttachmentTypes & toInternalNetworkAdapterEnum(enmType))802 if (m_enmRestrictedNetworkAttachmentTypes & toInternalNetworkAdapterEnum(enmType)) 797 803 continue; 798 804 m_pAttachmentTypeComboBox->insertItem(iAttachmentTypeIndex, gpConverter->toString(enmType)); … … 1036 1042 UIDataSettingsMachineNetwork oldNetworkData; 1037 1043 1044 const UIExtraDataMetaDefs::DetailsElementOptionTypeNetwork enmRestrictedNetworkAttachmentTypes = 1045 gEDataManager->restrictedNetworkAttachmentTypes(); 1046 1038 1047 /* For each network adapter: */ 1039 1048 for (int iSlot = 0; iSlot < m_pTabWidget->count(); ++iSlot) … … 1060 1069 oldAdapterData.m_strGenericProperties = loadGenericProperties(comAdapter); 1061 1070 oldAdapterData.m_fCableConnected = comAdapter.GetCableConnected(); 1071 oldAdapterData.m_enmRestrictedNetworkAttachmentTypes = enmRestrictedNetworkAttachmentTypes; 1062 1072 foreach (const QString &strRedirect, comAdapter.GetNATEngine().GetRedirects()) 1063 1073 {
Note:
See TracChangeset
for help on using the changeset viewer.