Changeset 42256 in vbox
- Timestamp:
- Jul 20, 2012 12:08:44 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsNetwork.cpp
r42254 r42256 217 217 } 218 218 219 /* Validate MAC-address : */219 /* Validate MAC-address length: */ 220 220 if (m_pMACEditor->text().size() < 12) 221 221 { … … 223 223 fValid = false; 224 224 } 225 else 226 { 227 QRegExp validator("[0-9A-Fa-f][02468ACEace][0-9A-Fa-f]{10}"); 228 if (!validator.exactMatch(m_pMACEditor->text())) 229 { 230 strWarning = tr("the second digit cannot be odd, as only unicast MAC addresses allowed."); 225 /* Make sure MAC-address is unicast: */ 226 if (m_pMACEditor->text().size() >= 2) 227 { 228 QRegExp validator("^[0-9A-Fa-f][02468ACEace]"); 229 if (validator.indexIn(m_pMACEditor->text()) != 0) 230 { 231 strWarning = tr("the second digit in the MAC Address field cannot be odd, " 232 "as only unicast addresses are allowed."); 231 233 fValid = false; 232 234 }
Note:
See TracChangeset
for help on using the changeset viewer.