Changeset 37779 in vbox for trunk/src/VBox/Frontends
- Timestamp:
- Jul 5, 2011 12:13:15 PM (14 years ago)
- svn:sync-xref-src-repo-rev:
- 72655
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsNetwork.cpp
r37645 r37779 1066 1066 { 1067 1067 /* Load total internal network list of all VMs: */ 1068 QStringList otherInternalNetworks;1069 1068 CVirtualBox vbox = vboxGlobal().virtualBox(); 1070 ulong uCount = qMin((ULONG) 4, vbox.GetSystemProperties().GetMaxNetworkAdapters(KChipsetType_PIIX3)); 1071 const CMachineVector &machines = vbox.GetMachines(); 1072 for (int i = 0; i < machines.size(); ++i) 1073 { 1074 const CMachine &machine = machines[i]; 1075 if (machine.GetAccessible()) 1076 { 1077 for (ulong uSlot = 0; uSlot < uCount; ++uSlot) 1078 { 1079 QString strName = machine.GetNetworkAdapter(uSlot).GetInternalNetwork(); 1080 if (!strName.isEmpty() && !otherInternalNetworks.contains(strName)) 1081 otherInternalNetworks << strName; 1082 } 1083 } 1084 } 1069 QStringList otherInternalNetworks(QList<QString>::fromVector(vbox.GetInternalNetworks())); 1085 1070 return otherInternalNetworks; 1086 1071 } … … 1090 1075 { 1091 1076 /* Load total generic driver list of all VMs: */ 1092 QStringList otherGenericDrivers;1093 1077 CVirtualBox vbox = vboxGlobal().virtualBox(); 1094 ulong uCount = qMin((ULONG) 4, vbox.GetSystemProperties().GetMaxNetworkAdapters(KChipsetType_PIIX3)); 1095 const CMachineVector &machines = vbox.GetMachines(); 1096 for (int i = 0; i < machines.size(); ++i) 1097 { 1098 const CMachine &machine = machines[i]; 1099 if (machine.GetAccessible()) 1100 { 1101 for (ulong uSlot = 0; uSlot < uCount; ++uSlot) 1102 { 1103 QString strName = machine.GetNetworkAdapter(uSlot).GetGenericDriver(); 1104 if (!strName.isEmpty() && !otherGenericDrivers.contains(strName)) 1105 otherGenericDrivers << strName; 1106 } 1107 } 1108 } 1078 QStringList otherGenericDrivers(QList<QString>::fromVector(vbox.GetGenericNetworkDrivers())); 1109 1079 return otherGenericDrivers; 1110 1080 }
Note:
See TracChangeset
for help on using the changeset viewer.