VirtualBox

Ignore:
Timestamp:
Mar 16, 2009 6:55:59 PM (16 years ago)
Author:
vboxsync
Message:

FE/Qt4: 2869: Rework network adapter UI - Strict check for IPv6 address field.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/VBoxVMSettingsNetworkDetails.cpp

    r17960 r17967  
    5252    mLeHMv4->setValidator (new QRegExpValidator
    5353        (QRegExp ("\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}"), this));
    54     //mLeIPv6->setValidator (new QRegExpValidator
    55     //    (QRegExp ("\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}"), this));
     54    mLeIPv6->setValidator (new QRegExpValidator
     55        (QRegExp ("[0-9a-fA-Z]{1,4}:{1,2}[0-9a-fA-Z]{1,4}:{1,2}"
     56                  "[0-9a-fA-Z]{1,4}:{1,2}[0-9a-fA-Z]{1,4}:{1,2}"
     57                  "[0-9a-fA-Z]{1,4}:{1,2}[0-9a-fA-Z]{1,4}:{1,2}"
     58                  "[0-9a-fA-Z]{1,4}:{1,2}[0-9a-fA-Z]{1,4}"), this));
    5659    //mLeHMv6->setValidator (new QRegExpValidator
    5760    //    (QRegExp ("\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}"), this));
    58     mLeIPv6->setFixedWidthByText (QString().fill ('X', 39));
     61    mLeIPv6->setFixedWidthByText (QString().fill ('X', 32) + QString().fill (':', 7));
    5962    connect (mCbHOI, SIGNAL (currentIndexChanged (int)),
    6063             this, SLOT (hostOnlyInterfaceChanged()));
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