Changeset 18303 in vbox for trunk/src/VBox/Frontends/VirtualBox
- Timestamp:
- Mar 26, 2009 11:11:10 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/VBoxGLSettingsNetwork.cpp
r18261 r18303 123 123 { 124 124 if (!mInterfaceAddress.isEmpty() && 125 QHostAddress (mInterfaceAddress).protocol() != QAbstractSocket::IPv4Protocol) 125 (QHostAddress (mInterfaceAddress) == QHostAddress::Any || 126 QHostAddress (mInterfaceAddress).protocol() != QAbstractSocket::IPv4Protocol)) 126 127 { 127 128 aWarning = QTreeWidget::tr ("host IPv4 address of <b>%1</b> is wrong").arg (text (0)); … … 129 130 } 130 131 if (!mInterfaceMask.isEmpty() && 131 QHostAddress (mInterfaceMask).protocol() != QAbstractSocket::IPv4Protocol) 132 (QHostAddress (mInterfaceMask) == QHostAddress::Any || 133 QHostAddress (mInterfaceMask).protocol() != QAbstractSocket::IPv4Protocol)) 132 134 { 133 135 aWarning = QTreeWidget::tr ("host IPv4 network mask of <b>%1</b> is wrong").arg (text (0)); … … 136 138 if (mIpv6Supported) 137 139 { 138 139 if (!mInterfaceAddress6.isEmpty() &&140 QHostAddress (mInterfaceAddress6).protocol() != QAbstractSocket::IPv6Protocol)140 if (!mInterfaceAddress6.isEmpty() && 141 (QHostAddress (mInterfaceAddress6) == QHostAddress::AnyIPv6 || 142 QHostAddress (mInterfaceAddress6).protocol() != QAbstractSocket::IPv6Protocol)) 141 143 { 142 144 aWarning = QTreeWidget::tr ("host IPv6 address of <b>%1</b> is wrong").arg (text (0)); … … 149 151 if (mDhcpServerEnabled) 150 152 { 151 if (QHostAddress (mDhcpServerAddress).protocol() != QAbstractSocket::IPv4Protocol) 153 if (QHostAddress (mDhcpServerAddress) == QHostAddress::Any || 154 QHostAddress (mDhcpServerAddress).protocol() != QAbstractSocket::IPv4Protocol) 152 155 { 153 156 aWarning = QTreeWidget::tr ("DHCP server address of <b>%1</b> is wrong").arg (text (0)); 154 157 return false; 155 158 } 156 if (QHostAddress (mDhcpServerMask).protocol() != QAbstractSocket::IPv4Protocol) 159 if (QHostAddress (mDhcpServerMask) == QHostAddress::Any || 160 QHostAddress (mDhcpServerMask).protocol() != QAbstractSocket::IPv4Protocol) 157 161 { 158 162 aWarning = QTreeWidget::tr ("DHCP server mask of <b>%1</b> is wrong").arg (text (0)); 159 163 return false; 160 164 } 161 if (QHostAddress (mDhcpLowerAddress).protocol() != QAbstractSocket::IPv4Protocol) 165 if (QHostAddress (mDhcpLowerAddress) == QHostAddress::Any || 166 QHostAddress (mDhcpLowerAddress).protocol() != QAbstractSocket::IPv4Protocol) 162 167 { 163 168 aWarning = QTreeWidget::tr ("DHCP lower address bound of <b>%1</b> is wrong").arg (text (0)); 164 169 return false; 165 170 } 166 if (QHostAddress (mDhcpUpperAddress).protocol() != QAbstractSocket::IPv4Protocol) 171 if (QHostAddress (mDhcpUpperAddress) == QHostAddress::Any || 172 QHostAddress (mDhcpUpperAddress).protocol() != QAbstractSocket::IPv4Protocol) 167 173 { 168 174 aWarning = QTreeWidget::tr ("DHCP upper address bound of <b>%1</b> is wrong").arg (text (0));
Note:
See TracChangeset
for help on using the changeset viewer.