VirtualBox

Changeset 94697 in vbox for trunk/src/VBox/Frontends


Ignore:
Timestamp:
Apr 22, 2022 11:50:41 PM (3 years ago)
Author:
vboxsync
Message:

FE/Qt: qt6: Use QString::indexOf(QRegularExpression &) instead of QRegExp.indexIn for the unicast MAC-address check. bugref:9898 bugref:6899

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsNetwork.cpp

    r94675 r94697  
    1717
    1818/* Qt includes: */
     19#include <QRegularExpression>
    1920#include <QVBoxLayout>
    2021
     
    452453        if (m_pEditorNetworkSettings->macAddress().size() >= 2)
    453454        {
    454             QRegExp validator("^[0-9A-Fa-f][02468ACEace]");
    455             if (validator.indexIn(m_pEditorNetworkSettings->macAddress()) != 0)
     455            if (m_pEditorNetworkSettings->macAddress().indexOf(QRegularExpression("^[0-9A-Fa-f][02468ACEace]")) != 0)
    456456            {
    457457                message.second << tr("The second digit in the MAC address may not be odd as only unicast addresses are allowed.");
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette